summaryrefslogtreecommitdiffstats
path: root/drivers/media/i2c
diff options
context:
space:
mode:
authorDan Carpenter <dan.carpenter@oracle.com>2016-03-15 04:07:10 -0300
committerMauro Carvalho Chehab <mchehab@osg.samsung.com>2016-04-13 17:10:59 -0300
commitcc7666a3948c6a554fa4c39b4fb4ccbdbdce1343 (patch)
treee26423deac8b539c17a91989012e1c5818c20917 /drivers/media/i2c
parent60587bd0680507f48ae3a7360983228fd207de8a (diff)
downloadlinux-cc7666a3948c6a554fa4c39b4fb4ccbdbdce1343.tar.bz2
[media] m5mols: potential uninitialized variable
Smatch complains that there are some paths where "status" isn't initialized. The code does assume that m5mols_read_u8() can fail so it seems as if Smatch is correct. Let's initialize it to REG_ISO_AUTO which is zero. Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
Diffstat (limited to 'drivers/media/i2c')
-rw-r--r--drivers/media/i2c/m5mols/m5mols_controls.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/media/i2c/m5mols/m5mols_controls.c b/drivers/media/i2c/m5mols/m5mols_controls.c
index a60931e66312..c2218c0a9e6f 100644
--- a/drivers/media/i2c/m5mols/m5mols_controls.c
+++ b/drivers/media/i2c/m5mols/m5mols_controls.c
@@ -405,7 +405,7 @@ static int m5mols_g_volatile_ctrl(struct v4l2_ctrl *ctrl)
struct v4l2_subdev *sd = to_sd(ctrl);
struct m5mols_info *info = to_m5mols(sd);
int ret = 0;
- u8 status;
+ u8 status = REG_ISO_AUTO;
v4l2_dbg(1, m5mols_debug, sd, "%s: ctrl: %s (%d)\n",
__func__, ctrl->name, info->isp_ready);