> -----Original Message-----
> From: Svyatoslav Nikolenko <[email protected]>
> Sent: Monday, September 21, 2026 3:00 PM
> To: Nguyen, Anthony L <[email protected]>; Kitszel,
> Przemyslaw <[email protected]>
> Cc: [email protected]; [email protected]; [email protected];
> [email protected]; [email protected]; [email protected];
> [email protected]; [email protected]; Svyatoslav
> Nikolenko <[email protected]>;
> [email protected]
> Subject: [PATCH] net: e1000: fix warning in iounmap on probe failure

What configuration you have the reproduction?
What are the reproduction steps?
Is it a crash?

Please specify which branch you aim to net/next.

Reviewed-by: Aleksandr Loktionov <[email protected]>

> 
> Reported-by: [email protected]

Rule of thumb it needs Fixes: tag then

> Signed-off-by: Svyatoslav Nikolenko <[email protected]>
> ---
>  drivers/net/ethernet/intel/e1000/e1000_main.c | 6 ++++--
>  1 file changed, 4 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/net/ethernet/intel/e1000/e1000_main.c
> b/drivers/net/ethernet/intel/e1000/e1000_main.c
> index d7f5c6f16142..156903089fa6 100644
> --- a/drivers/net/ethernet/intel/e1000/e1000_main.c
> +++ b/drivers/net/ethernet/intel/e1000/e1000_main.c
> @@ -1227,8 +1227,10 @@ static int e1000_probe(struct pci_dev *pdev,
> const struct pci_device_id *ent)
>       kfree(adapter->rx_ring);
>  err_dma:
>  err_sw_init:
> -     iounmap(hw->ce4100_gbe_mdio_base_virt);
> -     iounmap(hw->hw_addr);
> +     if (hw->ce4100_gbe_mdio_base_virt)
> +             iounmap(hw->ce4100_gbe_mdio_base_virt);
> +     if (hw->hw_addr)
> +             iounmap(hw->hw_addr);
>  err_ioremap:
>       disable_dev = !test_and_set_bit(__E1000_DISABLED, &adapter-
> >flags);
>       free_netdev(netdev);
> --
> 2.47.3

Reply via email to