diff options
author | Christophe JAILLET <christophe.jaillet@wanadoo.fr> | 2017-09-22 02:23:56 +0300 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2018-03-24 13:01:22 +0300 |
commit | 824f8613ea62f296c18026ef6da300ba441228ce (patch) | |
tree | b0fb6d15580cf1a5a3ded5cb2962116c9999c8c2 | |
parent | 2159db50a57264f18416b3d20f110044a7f92dac (diff) | |
download | linux-824f8613ea62f296c18026ef6da300ba441228ce.tar.xz |
media: bt8xx: Fix err 'bt878_probe()'
[ Upstream commit 45392ff6881dbe56d41ef0b17c2e576065f8ffa1 ]
This is odd to call 'pci_disable_device()' in an error path before a
coresponding successful 'pci_enable_device()'.
Return directly instead.
Fixes: 77e0be12100a ("V4L/DVB (4176): Bug-fix: Fix memory overflow")
Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
Signed-off-by: Sasha Levin <alexander.levin@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-rw-r--r-- | drivers/media/pci/bt8xx/bt878.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/media/pci/bt8xx/bt878.c b/drivers/media/pci/bt8xx/bt878.c index a5f52137d306..d4bc78b4fcb5 100644 --- a/drivers/media/pci/bt8xx/bt878.c +++ b/drivers/media/pci/bt8xx/bt878.c @@ -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; |