[PATCH] net: tlan: disable PCI device on remove

From: Guangshuo Li

Date: Wed Sep 16 2026 - 02:13:31 EST


tlan_probe1() enables the PCI device with pci_enable_device().

The probe failure path disables the device with pci_disable_device().
However, after a successful probe, tlan_remove_one() releases the PCI
regions and frees the net device without disabling the PCI device.

Call pci_disable_device() during removal to balance the successful
pci_enable_device() call.

This issue was found by manual code inspection.

Fixes: 1da177e4c3f4 ("Linux-2.6.12-rc2")
Cc: stable@xxxxxxxxxxxxxxx
Signed-off-by: Guangshuo Li <lgs201920130244@xxxxxxxxx>
---
drivers/net/ethernet/ti/tlan.c | 3 +++
1 file changed, 3 insertions(+)

diff --git a/drivers/net/ethernet/ti/tlan.c b/drivers/net/ethernet/ti/tlan.c
index 274a1837025c..0a8bed6c9ca0 100644
--- a/drivers/net/ethernet/ti/tlan.c
+++ b/drivers/net/ethernet/ti/tlan.c
@@ -302,6 +302,9 @@ static void tlan_remove_one(struct pci_dev *pdev)

cancel_work_sync(&priv->tlan_tqueue);
free_netdev(dev);
+#ifdef CONFIG_PCI
+ pci_disable_device(pdev);
+#endif
}

static void tlan_start(struct net_device *dev)
--
2.43.0