]> asedeno.scripts.mit.edu Git - linux.git/commitdiff
media: bt8xx: Fix err 'bt878_probe()'
authorChristophe JAILLET <christophe.jaillet@wanadoo.fr>
Thu, 21 Sep 2017 23:23:56 +0000 (19:23 -0400)
committerMauro Carvalho Chehab <mchehab@s-opensource.com>
Thu, 14 Dec 2017 14:52:58 +0000 (09:52 -0500)
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>
drivers/media/pci/bt8xx/bt878.c

index a5f52137d306a61d37c3060cadac10f6c8d9c3ec..d4bc78b4fcb5cbaa9c251c81a0619f17dd9d191e 100644 (file)
@@ -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;