mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH] parport: pc: balance PCI enable on cleanup
@ 2026-09-15  1:04 Myeonghun Pak
  0 siblings, 0 replies; only message in thread
From: Myeonghun Pak @ 2026-09-15  1:04 UTC (permalink / raw)
  To: Sudip Mukherjee; +Cc: linux-parport, linux-kernel, stable

The PCI card probe enables the device without disabling it on later
failure or removal. Use pcim_enable_device() to release the enable
reference after the registered ports have been torn down.

The early return for already-probed onboard Super-I/O devices remains
unchanged and does not acquire a managed enable reference.

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")
Cc: stable@vger.kernel.org
Assisted-by: LLM
Co-developed-by: Ijae Kim <ae878000@gmail.com>
Signed-off-by: Ijae Kim <ae878000@gmail.com>
Signed-off-by: Myeonghun Pak <mhun512@gmail.com>
---
 drivers/parport/parport_pc.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/parport/parport_pc.c b/drivers/parport/parport_pc.c
--- a/drivers/parport/parport_pc.c
+++ b/drivers/parport/parport_pc.c
@@ -2888,7 +2888,7 @@
 	/* This is a PCI card */
 	i -= last_sio;
 	count = 0;
-	err = pci_enable_device(dev);
+	err = pcim_enable_device(dev);
 	if (err)
 		return err;
 

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2026-09-15  1:04 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-09-15  1:04 [PATCH] parport: pc: balance PCI enable on cleanup Myeonghun Pak

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®