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)
committerDavid S. Miller <davem@davemloft.net>
Wed, 12 Sep 2018 07:04:28 +0000 (00:04 -0700)
commit150085791afb8054e11d2e080d4b9cd755dd7f69
tree881f8e22ab004a269dec1edd4bac819d562242a5
parent80de556a6bf47c39ed5999a2ac6f1dd4b6764bb7
net/tls: Fixed return value when tls_complete_pending_work() fails

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>
net/tls/tls_sw.c