Skip to content

Commit

Permalink
nfp: tls: fix error return code in nfp_net_tls_add()
Browse files Browse the repository at this point in the history
Fix to return negative error code -EINVAL from the error handling
case instead of 0, as done elsewhere in this function.

Fixes: 1f35a56 ("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>
  • Loading branch information
Wei Yongjun authored and David S. Miller committed Jul 8, 2019
1 parent 107d3ce commit 31d1666
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions drivers/net/ethernet/netronome/nfp/crypto/tls.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}

Expand Down

0 comments on commit 31d1666

Please sign in to comment.