Re: [PATCH net v2] net/qla3xxx: disable the PCI device on remove

From: Simon Horman

Date: Tue Sep 15 2026 - 05:59:06 EST


On Sun, Sep 13, 2026 at 04:45:34PM -0400, Myeonghun Pak wrote:
> ql3xxx_probe() enables the PCI device and balances that reference on
> probe failure. However, ql3xxx_remove() releases the mappings and PCI
> regions without disabling the device, leaving the enable reference
> held after unbind.
>
> Add pci_disable_device() at the end of ql3xxx_remove() to balance the
> successful probe's pci_enable_device() call. Keep the existing manual
> cleanup and probe error handling unchanged.
>
> This issue was identified during our ongoing static-analysis research while
> reviewing kernel code.
>
> Fixes: 5a4faa873782 ("[PATCH] qla3xxx NIC driver")
> Co-developed-by: Ijae Kim <ae878000@xxxxxxxxx>
> Signed-off-by: Ijae Kim <ae878000@xxxxxxxxx>
> Signed-off-by: Myeonghun Pak <mhun512@xxxxxxxxx>
> ---
> v2:
> - Add pci_disable_device() to ql3xxx_remove() instead of converting
> to pcim_enable_device(), as suggested by Simon Horman.
> v1: https://lore.kernel.org/netdev/20260911033219.34566-1-mhun512@xxxxxxxxx/

Thanks for the update.

Reviewed-by: Simon Horman <horms@xxxxxxxxxx>