]> asedeno.scripts.mit.edu Git - linux.git/commitdiff
media: cobalt: remove redundant zero check on retval
authorColin Ian King <colin.king@canonical.com>
Tue, 5 Sep 2017 15:19:44 +0000 (11:19 -0400)
committerMauro Carvalho Chehab <mchehab@s-opensource.com>
Sat, 23 Sep 2017 12:29:45 +0000 (08:29 -0400)
The error handling paths all end up with retval being non-zero,
so the check for retval being zero is always false and hence
is redundant. Remove it.

Detected by CoverityScan CID#1309479 ("Logically dead code")

Signed-off-by: Colin Ian King <colin.king@canonical.com>
Signed-off-by: Hans Verkuil <hansverk@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
drivers/media/pci/cobalt/cobalt-driver.c

index 98b6cb9505d192ae9eb6fa2e9e5568ff62d0f150..8487ecaa4d30d0094b1a317b4baff43d4a19c2a1 100644 (file)
@@ -767,8 +767,6 @@ static int cobalt_probe(struct pci_dev *pci_dev,
 err_wq:
        destroy_workqueue(cobalt->irq_work_queues);
 err:
-       if (retval == 0)
-               retval = -ENODEV;
        cobalt_err("error %d on initialization\n", retval);
 
        v4l2_device_unregister(&cobalt->v4l2_dev);