Commit e90ce8aa authored by Colin Ian King's avatar Colin Ian King Committed by Mauro Carvalho Chehab

media: cobalt: remove redundant zero check on retval

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: default avatarColin Ian King <colin.king@canonical.com>
Signed-off-by: default avatarHans Verkuil <hansverk@cisco.com>
Signed-off-by: default avatarMauro Carvalho Chehab <mchehab@s-opensource.com>
parent 2be730b8
......@@ -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);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment