[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <D33A6B7E.204D4%nilesh.javali@qlogic.com>
Date: Mon, 18 Apr 2016 05:17:39 +0000
From: Nilesh Javali <nilesh.javali@...gic.com>
To: Dan Carpenter <dan.carpenter@...cle.com>,
Dept-Eng QLogic Storage Upstream
<QLogic-Storage-Upstream@...gic.com>
CC: "James E.J. Bottomley" <jejb@...ux.vnet.ibm.com>,
"Martin K. Petersen" <martin.petersen@...cle.com>,
linux-scsi <linux-scsi@...r.kernel.org>,
linux-kernel <linux-kernel@...r.kernel.org>,
"kernel-janitors@...r.kernel.org" <kernel-janitors@...r.kernel.org>
Subject: Re: [patch] bnx2i: silence uninitialized variable warnings
On 14/04/16 3:10 PM, "Dan Carpenter" <dan.carpenter@...cle.com> wrote:
>Presumably it isn't possible to have empty lists here, but my static
>checker doesn't know that and complains that "ep" can be used
>uninitialized.
>
>Signed-off-by: Dan Carpenter <dan.carpenter@...cle.com>
>
>diff --git a/drivers/scsi/bnx2i/bnx2i_iscsi.c
>b/drivers/scsi/bnx2i/bnx2i_iscsi.c
>index 7289437..133901f 100644
>--- a/drivers/scsi/bnx2i/bnx2i_iscsi.c
>+++ b/drivers/scsi/bnx2i/bnx2i_iscsi.c
>@@ -675,7 +675,7 @@ bnx2i_find_ep_in_ofld_list(struct bnx2i_hba *hba, u32
>iscsi_cid)
> {
> struct list_head *list;
> struct list_head *tmp;
>- struct bnx2i_endpoint *ep;
>+ struct bnx2i_endpoint *ep = NULL;
>
> read_lock_bh(&hba->ep_rdwr_lock);
> list_for_each_safe(list, tmp, &hba->ep_ofld_list) {
>@@ -703,7 +703,7 @@ bnx2i_find_ep_in_destroy_list(struct bnx2i_hba *hba,
>u32 iscsi_cid)
> {
> struct list_head *list;
> struct list_head *tmp;
>- struct bnx2i_endpoint *ep;
>+ struct bnx2i_endpoint *ep = NULL;
>
> read_lock_bh(&hba->ep_rdwr_lock);
> list_for_each_safe(list, tmp, &hba->ep_destroy_list) {
Acked-by: Nilesh Javali <nilesh.javali@...gic.com>
Powered by blists - more mailing lists