summaryrefslogtreecommitdiff
path: root/drivers/scsi/bnx2i
diff options
context:
space:
mode:
authorDan Carpenter <dan.carpenter@oracle.com>2016-04-14 12:40:06 +0300
committerMartin K. Petersen <martin.petersen@oracle.com>2016-04-25 22:02:40 -0400
commit9c8a76d5f00dbfd1da6ea242a9263a47133e4053 (patch)
tree551ce51b64581c623e817209af5b96b02f98e973 /drivers/scsi/bnx2i
parentaa105695732daa6604cb017ceb59a05ef34956bd (diff)
bnx2i: silence uninitialized variable warnings
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@oracle.com> Acked-by: Nilesh Javali <nilesh.javali@qlogic.com> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Diffstat (limited to 'drivers/scsi/bnx2i')
-rw-r--r--drivers/scsi/bnx2i/bnx2i_iscsi.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/scsi/bnx2i/bnx2i_iscsi.c b/drivers/scsi/bnx2i/bnx2i_iscsi.c
index 72894378ffcf..133901fd3e35 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) {