[V2,media] cx18: remove redundant zero check on retval
diff mbox

Message ID 20180612094200.11545-1-colin.king@canonical.com
State New
Headers show

Commit Message

Colin King June 12, 2018, 9:42 a.m. UTC
From: Colin Ian King <colin.king@canonical.com>

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>
 drivers/media/pci/cx18/cx18-driver.c | 2 --
 1 file changed, 2 deletions(-)

diff mbox

diff --git a/drivers/media/pci/cx18/cx18-driver.c b/drivers/media/pci/cx18/cx18-driver.c
index 8f314ca320c7..0c389a3fb4e5 100644
--- a/drivers/media/pci/cx18/cx18-driver.c
+++ b/drivers/media/pci/cx18/cx18-driver.c
@@ -1134,8 +1134,6 @@  static int cx18_probe(struct pci_dev *pci_dev,
-	if (retval == 0)
-		retval = -ENODEV;
 	CX18_ERR("Error %d on initialization\n", retval);