summaryrefslogtreecommitdiffstats
path: root/drivers/net
diff options
context:
space:
mode:
authorWei Yongjun <weiyongjun1@huawei.com>2019-07-05 08:26:25 +0000
committerDavid S. Miller <davem@davemloft.net>2019-07-08 15:27:33 -0700
commit31d166642c7c601c65eccf0ff2e0afe9a0538be2 (patch)
treef8376ffb335a53094e0f498dfb607a90a21da6a4 /drivers/net
parent107d3ce60119fe1c03f07841795f54cc729a5441 (diff)
downloadlinux-31d166642c7c601c65eccf0ff2e0afe9a0538be2.tar.bz2
nfp: tls: fix error return code in nfp_net_tls_add()
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> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net')
-rw-r--r--drivers/net/ethernet/netronome/nfp/crypto/tls.c1
1 files changed, 1 insertions, 0 deletions
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;
}