[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20250619071253.3498-2-chuguangqing@inspur.com>
Date: Thu, 19 Jun 2025 15:11:21 +0800
From: chuguangqing <chuguangqing@...pur.com>
To: Tony Nguyen <anthony.l.nguyen@...el.com>, Przemek Kitszel
<przemyslaw.kitszel@...el.com>, Andrew Lunn <andrew+netdev@...n.ch>, "David
S. Miller" <davem@...emloft.net>, Eric Dumazet <edumazet@...gle.com>, Jakub
Kicinski <kuba@...nel.org>, Paolo Abeni <pabeni@...hat.com>
CC: <linux-kernel@...r.kernel.org>, chuguangqing <chuguangqing@...pur.com>
Subject: [PATCH 1/1] ixgbe: check the ioremap return value first (supplementary CC)
We should first check whether the ioremap return value is NULL before using it.
Signed-off-by: chuguangqing <chuguangqing@...pur.com>
---
drivers/net/ethernet/intel/ixgbe/ixgbe_main.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/net/ethernet/intel/ixgbe/ixgbe_main.c b/drivers/net/ethernet/intel/ixgbe/ixgbe_main.c
index 6eccfba51fac..97a49463b09d 100644
--- a/drivers/net/ethernet/intel/ixgbe/ixgbe_main.c
+++ b/drivers/net/ethernet/intel/ixgbe/ixgbe_main.c
@@ -11431,11 +11431,11 @@ static int ixgbe_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
hw->hw_addr = ioremap(pci_resource_start(pdev, 0),
pci_resource_len(pdev, 0));
- adapter->io_addr = hw->hw_addr;
if (!hw->hw_addr) {
err = -EIO;
goto err_ioremap;
}
+ adapter->io_addr = hw->hw_addr;
/* Setup hw api */
hw->mac.ops = *ii->mac_ops;
--
2.43.5
Powered by blists - more mailing lists