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
| ||
|
Date: Thu, 3 Dec 2020 23:28:16 +0100 From: Arnd Bergmann <arnd@...nel.org> To: Sakari Ailus <sakari.ailus@...ux.intel.com>, Mauro Carvalho Chehab <mchehab@...nel.org> Cc: Arnd Bergmann <arnd@...db.de>, linux-media@...r.kernel.org, linux-kernel@...r.kernel.org Subject: [PATCH] media: smiapp: avoid printing an uninitialized variable From: Arnd Bergmann <arnd@...db.de> There is no intialization for the 'reg' variable, so printing it produces undefined behavior as well as a compile-time warning: drivers/media/i2c/ccs/ccs-core.c:314:49: error: variable 'reg' is uninitialized when used here [-Werror,-Wuninitialized] "0x%8.8x %s pixels: %d %s (pixelcode %u)\n", reg, Remove the variable and stop printing it. Fixes: b24cc2a18c50 ("media: smiapp: Rename as "ccs"") Signed-off-by: Arnd Bergmann <arnd@...db.de> --- drivers/media/i2c/ccs/ccs-core.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/media/i2c/ccs/ccs-core.c b/drivers/media/i2c/ccs/ccs-core.c index 69e7990c65f3..58a42459109d 100644 --- a/drivers/media/i2c/ccs/ccs-core.c +++ b/drivers/media/i2c/ccs/ccs-core.c @@ -257,7 +257,6 @@ static int ccs_read_frame_fmt(struct ccs_sensor *sensor) u32 pixels; char *which; char *what; - u32 reg; if (fmt_model_type == CCS_FRAME_FORMAT_MODEL_TYPE_2_BYTE) { desc = CCS_LIM_AT(sensor, FRAME_FORMAT_DESCRIPTOR, i); @@ -311,7 +310,7 @@ static int ccs_read_frame_fmt(struct ccs_sensor *sensor) } dev_dbg(&client->dev, - "0x%8.8x %s pixels: %d %s (pixelcode %u)\n", reg, + "%s pixels: %d %s (pixelcode %u)\n", what, pixels, which, pixelcode); if (i < ncol_desc) { -- 2.27.0
Powered by blists - more mailing lists