summaryrefslogtreecommitdiffstats
path: root/drivers/media/i2c/imx274.c
diff options
context:
space:
mode:
authorDan Carpenter2017-12-05 15:37:39 +0100
committerMauro Carvalho Chehab2018-01-05 18:47:07 +0100
commit021741ad36b88cb2c662dd194b80b4439ab8697e (patch)
tree0c4034eeaac3b047293244204f817b1396e8cec1 /drivers/media/i2c/imx274.c
parentmedia: intel-ipu3: cio2: fix for wrong vb2buf state warnings (diff)
downloadkernel-qcow2-linux-021741ad36b88cb2c662dd194b80b4439ab8697e.tar.gz
kernel-qcow2-linux-021741ad36b88cb2c662dd194b80b4439ab8697e.tar.xz
kernel-qcow2-linux-021741ad36b88cb2c662dd194b80b4439ab8697e.zip
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;