]> www.infradead.org Git - users/dwmw2/linux.git/commitdiff
octeontx2-pf: check negative error code in otx2_open()
authorSu Hui <suhui@nfschina.com>
Thu, 28 Mar 2024 02:06:21 +0000 (10:06 +0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 10 Apr 2024 14:19:39 +0000 (16:19 +0200)
commit e709acbd84fb6ef32736331b0147f027a3ef4c20 upstream.

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>
Reviewed-by: Simon Horman <horms@kernel.org>
Reviewed-by: Kalesh AP <kalesh-anakkur.purayil@broadcom.com>
Link: https://lore.kernel.org/r/20240328020620.4054692-1-suhui@nfschina.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/net/ethernet/marvell/octeontx2/nic/otx2_pf.c

index 167b926196c83b310e2936f5139d4ab00c670f25..5f093b34db698a31f32515fd8a867ec7701c17df 100644 (file)
@@ -1795,7 +1795,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;