]> git.baikalelectronics.ru Git - kernel.git/commitdiff
media: saa7164: fix missing pci_disable_device()
authorLiu Shixin <liushixin2@huawei.com>
Sat, 26 Nov 2022 11:31:26 +0000 (11:31 +0000)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 18 Jan 2023 10:41:09 +0000 (11:41 +0100)
[ Upstream commit 57fb35d7542384cac8f198cd1c927540ad38b61a ]

Add missing pci_disable_device() in the error path in saa7164_initdev().

Fixes: b873a81a0bd7 ("V4L/DVB (12923): SAA7164: Add support for the NXP SAA7164 silicon")
Signed-off-by: Liu Shixin <liushixin2@huawei.com>
Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/media/pci/saa7164/saa7164-core.c

index 9ae04e18e6c686a3e834cf19f1c07a12bf5c5af6..59b039b953bbcd7822d8d085c7069e4fa0b08fef 100644 (file)
@@ -1227,7 +1227,7 @@ static int saa7164_initdev(struct pci_dev *pci_dev,
 
        if (saa7164_dev_setup(dev) < 0) {
                err = -EINVAL;
-               goto fail_free;
+               goto fail_dev;
        }
 
        /* print pci info */
@@ -1395,6 +1395,8 @@ fail_fw:
 
 fail_irq:
        saa7164_dev_unregister(dev);
+fail_dev:
+       pci_disable_device(pci_dev);
 fail_free:
        v4l2_device_unregister(&dev->v4l2_dev);
        kfree(dev);