media: tw5864: Disable PCI device when finished
authorKieran Bingham <kieran.bingham+renesas@ideasonboard.com>
Fri, 22 Oct 2021 10:06:44 +0000 (11:06 +0100)
committerMauro Carvalho Chehab <mchehab+huawei@kernel.org>
Mon, 15 Nov 2021 08:12:01 +0000 (08:12 +0000)
The cleanup in tw5864_finidev() neglected to disable the PCI device
after enabling it in tw5864_initdev().

Call pci_disable_device() after releasing the associated resources.

Signed-off-by: Kieran Bingham <kieran.bingham+renesas@ideasonboard.com>
Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
drivers/media/pci/tw5864/tw5864-core.c

index fee3b77..5cae73e 100644 (file)
@@ -334,6 +334,7 @@ static void tw5864_finidev(struct pci_dev *pci_dev)
        /* release resources */
        iounmap(dev->mmio);
        pci_release_regions(pci_dev);
+       pci_disable_device(pci_dev);
 
        v4l2_device_unregister(&dev->v4l2_dev);
 }