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>
Wed, 5 Dec 2018 18:41:11 +0000 (19:41 +0100)
commit39d9e1c62e3f8b5569a0d9bf4d47a3d5d8ae02e2
tree132d5f8305d6389acf561182e366474dd375f4fe
parent2a0f5919e1e6a1c0423d895ab75eb15f94a67c69
net/tls: Fixed return value when tls_complete_pending_work() fails

commit 150085791afb8054e11d2e080d4b9cd755dd7f69 upstream.

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>
[bwh: Backported to 4.14: adjust context]
Signed-off-by: Ben Hutchings <ben.hutchings@codethink.co.uk>
Signed-off-by: Sasha Levin <sashal@kernel.org>
net/tls/tls_sw.c