summaryrefslogtreecommitdiffstats
path: root/drivers/media/i2c
diff options
context:
space:
mode:
authorColin Ian King2017-11-03 07:41:06 +0100
committerMauro Carvalho Chehab2017-11-07 09:05:40 +0100
commit2b00e30fc33de720cedad69427931aa393cdbaf0 (patch)
tree5537ede2ebddf9bbd2cb45f42e11eff66caf1030 /drivers/media/i2c
parentmedia: camss-vfe: always initialize reg at vfe_set_xbar_cfg() (diff)
downloadkernel-qcow2-linux-2b00e30fc33de720cedad69427931aa393cdbaf0.tar.gz
kernel-qcow2-linux-2b00e30fc33de720cedad69427931aa393cdbaf0.tar.xz
kernel-qcow2-linux-2b00e30fc33de720cedad69427931aa393cdbaf0.zip
media: imx274: fix missing return assignment from call to imx274_mode_regs
The variable ret is being checked for failure however it is not being set from the return status from the call to imx274_mode_regs. Currently ret is alwayus zero and the check is redundant. Fix this by assigning it. Detected by CoverityScan, CID#1460278 ("Logically dead code") Fixes: 0985dd306f72 ("media: imx274: V4l2 driver for Sony imx274 CMOS sensor") Signed-off-by: Colin Ian King <colin.king@canonical.com> Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
Diffstat (limited to 'drivers/media/i2c')
-rw-r--r--drivers/media/i2c/imx274.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/media/i2c/imx274.c b/drivers/media/i2c/imx274.c
index ab6a5f31da74..800b9bf9cdd3 100644
--- a/drivers/media/i2c/imx274.c
+++ b/drivers/media/i2c/imx274.c
@@ -1059,7 +1059,7 @@ static int imx274_s_stream(struct v4l2_subdev *sd, int on)
if (on) {
/* load mode registers */
- imx274_mode_regs(imx274, imx274->mode_index);
+ ret = imx274_mode_regs(imx274, imx274->mode_index);
if (ret)
goto fail;