net/tls: Fixed return value when tls_complete_pending_work() fails
authorVakul Garg <vakul.garg@nxp.com>
Mon, 10 Sep 2018 17:23:46 +0000 (22:53 +0530)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 6 Sep 2019 08:22:03 +0000 (10:22 +0200)
commitf7009bbaff54d5e4b72909ac3beb07920dd95d84
tree9fe25449b17d720bf414311be67ca86cd5949fae
parentdc066fd0d0737b0e4263775951789c9aa765a8c3
net/tls: Fixed return value when tls_complete_pending_work() fails

[ Upstream commit 150085791afb8054e11d2e080d4b9cd755dd7f69 ]

In tls_sw_sendmsg() and tls_sw_sendpage(), the variable 'ret' has
been set to return value of tls_complete_pending_work(). This allows
return of proper error code if tls_complete_pending_work() fails.

Fixes: 3c4d7559159b ("tls: kernel TLS support")
Signed-off-by: Vakul Garg <vakul.garg@nxp.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
net/tls/tls_sw.c