[<prev] [next>] [day] [month] [year] [list]
Message-ID: <20160414093303.GC16549@mwanda>
Date: Thu, 14 Apr 2016 12:33:03 +0300
From: Dan Carpenter <dan.carpenter@...cle.com>
To: "Nicholas A. Bellinger" <nab@...ux-iscsi.org>
Cc: linux-scsi@...r.kernel.org, target-devel@...r.kernel.org,
linux-kernel@...r.kernel.org, kernel-janitors@...r.kernel.org
Subject: [patch] target: Silence an uninitialized variable warning
I'm getting a static checker warning:
drivers/target/target_core_sbc.c:1150 sbc_parse_cdb()
error: uninitialized variable 'size'.
It looks like a possible bug but wouldn't it have shown up in testing?
Anyway let's just silence it by setting size to zero.
Signed-off-by: Dan Carpenter <dan.carpenter@...cle.com>
diff --git a/drivers/target/target_core_sbc.c b/drivers/target/target_core_sbc.c
index a9057aa..0c6e55f 100644
--- a/drivers/target/target_core_sbc.c
+++ b/drivers/target/target_core_sbc.c
@@ -828,7 +828,7 @@ sbc_parse_cdb(struct se_cmd *cmd, struct sbc_ops *ops)
{
struct se_device *dev = cmd->se_dev;
unsigned char *cdb = cmd->t_task_cdb;
- unsigned int size;
+ unsigned int size = 0;
u32 sectors = 0;
sense_reason_t ret;
Powered by blists - more mailing lists