summaryrefslogtreecommitdiffstats
path: root/drivers/media/i2c/ov2659.c
diff options
context:
space:
mode:
authorGustavo A. R. Silva <garsilva@embeddedor.com>2017-05-04 02:13:18 +0200
committerMauro Carvalho Chehab <mchehab@s-opensource.com>2017-06-06 13:13:15 +0200
commite1082d28721081858a51f6c0148a3c7603d9e65e (patch)
tree8f58f66ac1d059d13d157ae6b6f3f702bda21740 /drivers/media/i2c/ov2659.c
parent[media] coda: simplify optional reset handling (diff)
downloadlinux-e1082d28721081858a51f6c0148a3c7603d9e65e.tar.xz
linux-e1082d28721081858a51f6c0148a3c7603d9e65e.zip
[media] media: i2c: initialize scalar variables
Initialize scalar variables _pid_ and _ver_ to avoid a possible misbehavior. Addresses-Coverity-ID: 1324239 Addresses-Coverity-ID: 1324240 Signed-off-by: Gustavo A. R. Silva <garsilva@embeddedor.com> Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
Diffstat (limited to 'drivers/media/i2c/ov2659.c')
-rw-r--r--drivers/media/i2c/ov2659.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/media/i2c/ov2659.c b/drivers/media/i2c/ov2659.c
index 6e6367214d40..58615f836fb7 100644
--- a/drivers/media/i2c/ov2659.c
+++ b/drivers/media/i2c/ov2659.c
@@ -1308,7 +1308,8 @@ static const struct v4l2_subdev_internal_ops ov2659_subdev_internal_ops = {
static int ov2659_detect(struct v4l2_subdev *sd)
{
struct i2c_client *client = v4l2_get_subdevdata(sd);
- u8 pid, ver;
+ u8 pid = 0;
+ u8 ver = 0;
int ret;
dev_dbg(&client->dev, "%s:\n", __func__);