netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH net-next] nfp: tls: fix error return code in nfp_net_tls_add()
@ 2019-07-05  8:26 Wei Yongjun
  2019-07-05 16:21 ` Jakub Kicinski
  0 siblings, 1 reply; 2+ messages in thread
From: Wei Yongjun @ 2019-07-05  8:26 UTC (permalink / raw)
  To: Jakub Kicinski, Dirk van der Merwe
  Cc: Wei Yongjun, oss-drivers, netdev, kernel-janitors

Fix to return negative error code -EINVAL from the error handling
case instead of 0, as done elsewhere in this function.

Fixes: 1f35a56cf586 ("nfp: tls: add/delete TLS TX connections")
Signed-off-by: Wei Yongjun <weiyongjun1@huawei.com>
---
 drivers/net/ethernet/netronome/nfp/crypto/tls.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/net/ethernet/netronome/nfp/crypto/tls.c b/drivers/net/ethernet/netronome/nfp/crypto/tls.c
index 3ee829d69c04..9f7ccb7da417 100644
--- a/drivers/net/ethernet/netronome/nfp/crypto/tls.c
+++ b/drivers/net/ethernet/netronome/nfp/crypto/tls.c
@@ -344,6 +344,7 @@ nfp_net_tls_add(struct net_device *netdev, struct sock *sk,
 
 	if (!reply->handle[0] && !reply->handle[1]) {
 		nn_dp_warn(&nn->dp, "FW returned NULL handle\n");
+		err = -EINVAL;
 		goto err_fw_remove;
 	}




^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH net-next] nfp: tls: fix error return code in nfp_net_tls_add()
  2019-07-05  8:26 [PATCH net-next] nfp: tls: fix error return code in nfp_net_tls_add() Wei Yongjun
@ 2019-07-05 16:21 ` Jakub Kicinski
  0 siblings, 0 replies; 2+ messages in thread
From: Jakub Kicinski @ 2019-07-05 16:21 UTC (permalink / raw)
  To: Wei Yongjun; +Cc: Dirk van der Merwe, oss-drivers, netdev, kernel-janitors

On Fri, 5 Jul 2019 08:26:25 +0000, Wei Yongjun wrote:
> Fix to return negative error code -EINVAL from the error handling
> case instead of 0, as done elsewhere in this function.
> 
> Fixes: 1f35a56cf586 ("nfp: tls: add/delete TLS TX connections")
> Signed-off-by: Wei Yongjun <weiyongjun1@huawei.com>

Acked-by: Jakub Kicinski <jakub.kicinski@netronome.com>

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2019-07-05 16:21 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-07-05  8:26 [PATCH net-next] nfp: tls: fix error return code in nfp_net_tls_add() Wei Yongjun
2019-07-05 16:21 ` Jakub Kicinski

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).