net: wan: farsync: Disable PCI device on removal
Subsystems (4)
PATCH 1/1 net: wan: farsync: Disable PCI device on removal
fst_add_one() enables the PCI device and disables it on probe failures, but fst_remove_one() never releases the successful probe's enable reference. Disable the PCI device after the existing interrupt, tasklet, mapping and DMA cleanup has completed.
This issue is already present in the initial Git import; its pre-Git introduction is unknown.
This issue was identified during our ongoing static-analysis research while reviewing kernel code.
--- drivers/net/wan/farsync.c | 1 + 1 file changed, 1 insertion(+)
drivers/net/wan/farsync.c +1 -0
@@ -2561,6 +2561,7 @@ fst_remove_one(struct pci_dev *pdev) card->tx_dma_handle_card); } fst_card_array[card->card_no] =NULL ; +pci_disable_device (pdev);kfree (card); }
Quoted 26 lines · Myeonghun Pak
fst_add_one()enables the PCI device and disables it on probe failures, butfst_remove_one()never releases the successful probe's enable reference. Disable the PCI device after the existing interrupt, tasklet, mapping and DMA cleanup has completed.This issue is already present in the initial Git import; its pre-Git introduction is unknown.
This issue was identified during our ongoing static-analysis research while reviewing kernel code.
Fixes 1da177e4c3f4 ("Linux-2.6.12-rc2")Assisted-by LLMCo-developed-by Ijae Kim <[email protected]>Signed-off-by Ijae Kim <[email protected]>Signed-off-by Myeonghun Pak <[email protected]>--- drivers/net/wan/farsync.c | 1 + 1 file changed, 1 insertion(+)drivers/net/wan/farsync.c +0
-0
drivers/net/wan/farsync.c fst_remove_one(struct pci_dev *pdev) · line 2567
Quoted 7 lines
drivers/net/wan/farsync.c +1
-0@@ -2561,6 +2561,7 @@ fst_remove_one(struct pci_dev *pdev) card->tx_dma_handle_card); } fst_card_array[card->card_no] =NULL ; +pci_disable_device (pdev);kfree (card); }
The patch looks good to me. By the way, the commit message could be a bit more concise.
Thanks
Jakub Kicinski
maintainerQuoted 1 line · On Mon, 14 Sep 2026 21:59:40 -0400 Myeonghun Pak wrote:
Subject: [PATCH net] net: wan: farsync: Disable PCI device on removal
We're not fixing minor issues in orphaned drivers, sorry.