]> git.karo-electronics.de Git - linux-beck.git/commitdiff
[media] cx88: fix error return code in cx8802_dvb_probe()
authorWei Yongjun <weiyongjun1@huawei.com>
Wed, 21 Sep 2016 15:12:58 +0000 (12:12 -0300)
committerMauro Carvalho Chehab <mchehab@s-opensource.com>
Mon, 24 Oct 2016 20:01:32 +0000 (18:01 -0200)
Fix to return error code -ENODEV from the error handling case
instead of 0(err maybe overwrited to 0 in the for loop), as
done elsewhere in this function.

[mchehab@s-opensource.com: remove a now uneeded set for err = -ENODEV]

Signed-off-by: Wei Yongjun <weiyongjun1@huawei.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
drivers/media/pci/cx88/cx88-dvb.c

index fe5fd2a4650b77c113a67850f67f660300215d7b..157bc14874eb68eed498ea024f68cd8cf494360b 100644 (file)
@@ -1769,7 +1769,6 @@ static int cx8802_dvb_probe(struct cx8802_driver *drv)
        if (err)
                goto fail_core;
 
-       err = -ENODEV;
        for (i = 1; i <= core->board.num_frontends; i++) {
                struct vb2_queue *q;
 
@@ -1777,6 +1776,7 @@ static int cx8802_dvb_probe(struct cx8802_driver *drv)
                if (fe == NULL) {
                        printk(KERN_ERR "%s() failed to get frontend(%d)\n",
                                        __func__, i);
+                       err = -ENODEV;
                        goto fail_probe;
                }
                q = &fe->dvb.dvbq;