Skip to content

Commit

Permalink
media: bt8xx: Fix err 'bt878_probe()'
Browse files Browse the repository at this point in the history
[ Upstream commit 45392ff ]

This is odd to call 'pci_disable_device()' in an error path before a
coresponding successful 'pci_enable_device()'.

Return directly instead.

Fixes: 77e0be1 ("V4L/DVB (4176): Bug-fix: Fix memory overflow")

Signed-off-by: Christophe JAILLET <[email protected]>
Signed-off-by: Mauro Carvalho Chehab <[email protected]>
Signed-off-by: Sasha Levin <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
  • Loading branch information
tititiou36 authored and gregkh committed Mar 24, 2018
1 parent 2159db5 commit 824f861
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions drivers/media/pci/bt8xx/bt878.c
Original file line number Diff line number Diff line change
Expand Up @@ -422,8 +422,7 @@ static int bt878_probe(struct pci_dev *dev, const struct pci_device_id *pci_id)
bt878_num);
if (bt878_num >= BT878_MAX) {
printk(KERN_ERR "bt878: Too many devices inserted\n");
result = -ENOMEM;
goto fail0;
return -ENOMEM;
}
if (pci_enable_device(dev))
return -EIO;
Expand Down

0 comments on commit 824f861

Please sign in to comment.