summaryrefslogtreecommitdiffstats
path: root/drivers/media/i2c/imx274.c
diff options
context:
space:
mode:
authorDan Carpenter <dan.carpenter@oracle.com>2017-12-05 09:37:39 -0500
committerMauro Carvalho Chehab <mchehab@s-opensource.com>2018-01-05 12:47:07 -0500
commit021741ad36b88cb2c662dd194b80b4439ab8697e (patch)
tree0c4034eeaac3b047293244204f817b1396e8cec1 /drivers/media/i2c/imx274.c
parentdcd80955a0a13d6da3d4954c92801fb52cd950b4 (diff)
downloadlinux-021741ad36b88cb2c662dd194b80b4439ab8697e.tar.bz2
media: imx274: Silence uninitialized variable warning
Smatch complains that "err" can be uninitialized if we have a zero size write. The flow analysis is a little complicated so I'm not sure if that's possible or not, but it's harmless to set this to zero and it makes the code easier to read. Signed-off-by: Dan Carpenter <dan.carpenter@oracle.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/imx274.c')
-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 59d077b97910..664e8acdf2a0 100644
--- a/drivers/media/i2c/imx274.c
+++ b/drivers/media/i2c/imx274.c
@@ -634,7 +634,7 @@ static int imx274_regmap_util_write_table_8(struct regmap *regmap,
const struct reg_8 table[],
u16 wait_ms_addr, u16 end_addr)
{
- int err;
+ int err = 0;
const struct reg_8 *next;
u8 val;