lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [day] [month] [year] [list]
Message-ID: <20160315070710.GD13560@mwanda>
Date:	Tue, 15 Mar 2016 10:07:10 +0300
From:	Dan Carpenter <dan.carpenter@...cle.com>
To:	Kyungmin Park <kyungmin.park@...sung.com>
Cc:	Heungjun Kim <riverful.kim@...sung.com>,
	Mauro Carvalho Chehab <mchehab@....samsung.com>,
	linux-media@...r.kernel.org, linux-kernel@...r.kernel.org,
	kernel-janitors@...r.kernel.org
Subject: [patch] [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@...cle.com>

diff --git a/drivers/media/i2c/m5mols/m5mols_controls.c b/drivers/media/i2c/m5mols/m5mols_controls.c
index a60931e..c2218c0 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);

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ