aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSu Hui <[email protected]>2024-03-28 10:06:21 +0800
committerJakub Kicinski <[email protected]>2024-03-29 12:37:35 -0700
commite709acbd84fb6ef32736331b0147f027a3ef4c20 (patch)
tree8aa3950d9f1273aeb164fb851fcad7c8f6837312
parent5086f0fe46dcf8687c8c2e41e1f07826affebbba (diff)
octeontx2-pf: check negative error code in otx2_open()
otx2_rxtx_enable() return negative error code such as -EIO, check -EIO rather than EIO to fix this problem. Fixes: c926252205c4 ("octeontx2-pf: Disable packet I/O for graceful exit") Signed-off-by: Su Hui <[email protected]> Reviewed-by: Subbaraya Sundeep <[email protected]> Reviewed-by: Simon Horman <[email protected]> Reviewed-by: Kalesh AP <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Jakub Kicinski <[email protected]>
-rw-r--r--drivers/net/ethernet/marvell/octeontx2/nic/otx2_pf.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/net/ethernet/marvell/octeontx2/nic/otx2_pf.c b/drivers/net/ethernet/marvell/octeontx2/nic/otx2_pf.c
index b40bd0e46751..3f46d5e0fb2e 100644
--- a/drivers/net/ethernet/marvell/octeontx2/nic/otx2_pf.c
+++ b/drivers/net/ethernet/marvell/octeontx2/nic/otx2_pf.c
@@ -1933,7 +1933,7 @@ int otx2_open(struct net_device *netdev)
* mcam entries are enabled to receive the packets. Hence disable the
* packet I/O.
*/
- if (err == EIO)
+ if (err == -EIO)
goto err_disable_rxtx;
else if (err)
goto err_tx_stop_queues;