media: cx18: remove redundant zero check on retval
authorColin Ian King <colin.king@canonical.com>
Tue, 12 Jun 2018 09:42:00 +0000 (05:42 -0400)
committerMauro Carvalho Chehab <mchehab+samsung@kernel.org>
Thu, 28 Jun 2018 11:54:03 +0000 (07:54 -0400)
The check for a zero retval is redundant as all paths that lead to
this point have set retval to an error return value that is non-zero.
Remove the redundant check.

Detected by CoverityScan, CID#102589 ("Logically dead code")

Signed-off-by: Colin Ian King <colin.king@canonical.com>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
drivers/media/pci/cx18/cx18-driver.c

index 8f314ca320c73b2dce41eef213d094576a5e6a4e..0c389a3fb4e5f0fb9bdaaa75128e0a177898ba10 100644 (file)
@@ -1134,8 +1134,6 @@ free_mem:
 free_workqueues:
        destroy_workqueue(cx->in_work_queue);
 err:
-       if (retval == 0)
-               retval = -ENODEV;
        CX18_ERR("Error %d on initialization\n", retval);
 
        v4l2_device_unregister(&cx->v4l2_dev);