Skip to content

Commit

Permalink
media: saa7164: fix missing pci_disable_device()
Browse files Browse the repository at this point in the history
[ Upstream commit 57fb35d ]

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

Fixes: 443c122 ("V4L/DVB (12923): SAA7164: Add support for the NXP SAA7164 silicon")
Signed-off-by: Liu Shixin <[email protected]>
Signed-off-by: Hans Verkuil <[email protected]>
Signed-off-by: Mauro Carvalho Chehab <[email protected]>
Signed-off-by: Sasha Levin <[email protected]>
  • Loading branch information
Liu Shixin authored and gregkh committed Jan 7, 2023
1 parent 68c4ab9 commit 6204de8
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion drivers/media/pci/saa7164/saa7164-core.c
Original file line number Diff line number Diff line change
Expand Up @@ -1250,7 +1250,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 */
Expand Down Expand Up @@ -1422,6 +1422,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);
Expand Down

0 comments on commit 6204de8

Please sign in to comment.