Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 6a8c0abc authored by Liu Shixin's avatar Liu Shixin Committed by Greg Kroah-Hartman
Browse files

media: saa7164: fix missing pci_disable_device()



[ Upstream commit 57fb35d7542384cac8f198cd1c927540ad38b61a ]

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

Fixes: 443c1228 ("V4L/DVB (12923): SAA7164: Add support for the NXP SAA7164 silicon")
Signed-off-by: default avatarLiu Shixin <liushixin2@huawei.com>
Signed-off-by: default avatarHans Verkuil <hverkuil-cisco@xs4all.nl>
Signed-off-by: default avatarMauro Carvalho Chehab <mchehab@kernel.org>
Signed-off-by: default avatarSasha Levin <sashal@kernel.org>
parent 4cabc3af
Loading
Loading
Loading
Loading
+3 −1
Original line number Diff line number Diff line
@@ -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 @@ static int saa7164_initdev(struct pci_dev *pci_dev,

fail_irq:
	saa7164_dev_unregister(dev);
fail_dev:
	pci_disable_device(pci_dev);
fail_free:
	v4l2_device_unregister(&dev->v4l2_dev);
	kfree(dev);