Message ID | 20240325073549.823832-1-suhui@nfschina.com (mailing list archive) |
---|---|
State | Superseded |
Delegated to: | Netdev Maintainers |
Headers | show |
Series | [1/2] octeontx2-pf: check negative error code in otx2_open() | expand |
>-----Original Message----- >From: Su Hui <suhui@nfschina.com> >Sent: Monday, March 25, 2024 1:06 PM >To: Sunil Kovvuri Goutham <sgoutham@marvell.com>; Geethasowjanya Akula ><gakula@marvell.com>; Subbaraya Sundeep Bhatta <sbhatta@marvell.com>; >Hariprasad Kelam <hkelam@marvell.com>; davem@davemloft.net; >edumazet@google.com; kuba@kernel.org; pabeni@redhat.com >Cc: Su Hui <suhui@nfschina.com>; Sai Krishna Gajula ><saikrishnag@marvell.com>; netdev@vger.kernel.org; linux- >kernel@vger.kernel.org; kernel-janitors@vger.kernel.org >Subject: [PATCH 1/2] 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 <suhui@nfschina.com> Reviewed-by: Subbaraya Sundeep <sbhatta@marvell.com>
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;
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 <suhui@nfschina.com> --- drivers/net/ethernet/marvell/octeontx2/nic/otx2_pf.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)