* [PATCH] [media] gspca_stv06xx: remove redundant check for err < 0
@ 2017-01-11 16:24 Colin King
0 siblings, 0 replies; only message in thread
From: Colin King @ 2017-01-11 16:24 UTC (permalink / raw)
To: Hans Verkuil, Mauro Carvalho Chehab, linux-media; +Cc: linux-kernel
From: Colin Ian King <colin.king@canonical.com>
The comparison of err < 0 is redundant as err has been previously
been assigned to 0 and has not changed. Remove the redundant check.
Fixes CoverityScan CID#703363 ("Logically dead code")
Signed-off-by: Colin Ian King <colin.king@canonical.com>
---
drivers/media/usb/gspca/stv06xx/stv06xx_vv6410.c | 3 ---
1 file changed, 3 deletions(-)
diff --git a/drivers/media/usb/gspca/stv06xx/stv06xx_vv6410.c b/drivers/media/usb/gspca/stv06xx/stv06xx_vv6410.c
index f86cec0..7f1cc56 100644
--- a/drivers/media/usb/gspca/stv06xx/stv06xx_vv6410.c
+++ b/drivers/media/usb/gspca/stv06xx/stv06xx_vv6410.c
@@ -120,9 +120,6 @@ static int vv6410_init(struct sd *sd)
for (i = 0; i < ARRAY_SIZE(stv_bridge_init); i++)
stv06xx_write_bridge(sd, stv_bridge_init[i].addr, stv_bridge_init[i].data);
- if (err < 0)
- return err;
-
err = stv06xx_write_sensor_bytes(sd, (u8 *) vv6410_sensor_init,
ARRAY_SIZE(vv6410_sensor_init));
return (err < 0) ? err : 0;
--
2.10.2
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2017-01-11 16:25 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-01-11 16:24 [PATCH] [media] gspca_stv06xx: remove redundant check for err < 0 Colin King
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).