On Mon Sep 14 21:11:05 2026 -0400, Myeonghun Pak wrote:
> tw68_initdev() leaves the PCI device enabled after a later probe failure
> or tw68_finidev(). Use pcim_enable_device() to balance the enable reference
> when the driver is detached or probe fails.
> 
> The managed disable runs after the managed IRQ has been released.
> 
> This issue was identified during our ongoing static-analysis research
> while reviewing kernel code.
> 
> Fixes: e15d1c12c587 ("[media] tw68: refactor and cleanup the tw68 driver")
> Cc: [email protected]
> Assisted-by: LLM
> Co-developed-by: Ijae Kim <[email protected]>
> Signed-off-by: Ijae Kim <[email protected]>
> Signed-off-by: Myeonghun Pak <[email protected]>
> Signed-off-by: Hans Verkuil <[email protected]>

Patch committed.

Thanks,
Hans Verkuil

 drivers/media/pci/tw68/tw68-core.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

---

diff --git a/drivers/media/pci/tw68/tw68-core.c 
b/drivers/media/pci/tw68/tw68-core.c
index a18107ddb0ac..0909b2d9fcdd 100644
--- a/drivers/media/pci/tw68/tw68-core.c
+++ b/drivers/media/pci/tw68/tw68-core.c
@@ -228,7 +228,7 @@ static int tw68_initdev(struct pci_dev *pci_dev,
 
        /* pci init */
        dev->pci = pci_dev;
-       if (pci_enable_device(pci_dev)) {
+       if (pcim_enable_device(pci_dev)) {
                err = -EIO;
                goto fail1;
        }
_______________________________________________
linuxtv-commits mailing list -- [email protected]
To unsubscribe send an email to [email protected]

Reply via email to