Skip to contentSkip to conversation

scsi: a100u2w: Disable the PCI device on removal

PATCH New Myeonghun Pak 1 participant 1 message Sep 15

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 scsi: a100u2w: Disable the PCI device on removal

inia100_probe_one() enables the PCI device, but the remove callback never drops that enable reference. Disable the device after releasing the host and its resources.

The imbalance is already present in the initial Git import.

This issue was identified during our ongoing static-analysis research while reviewing kernel code.

Fixes 1da177e4c3f4 ("Linux-2.6.12-rc2")
Assisted-by LLM
---
 drivers/scsi/a100u2w.c | 1 +
 1 file changed, 1 insertion(+)
drivers/scsi/a100u2w.c +1 -0
@@ -1204,6 +1204,7 @@ static void inia100_remove_one(struct pci_dev *pdev)
         release_region(shost->io_port, 256);
 
 	scsi_host_put(shost);
+	pci_disable_device(pdev);
 } 
 
 static const struct pci_device_id inia100_pci_tbl[] = {