Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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>

authored by

Dan Carpenter and committed by
Martin K. Petersen
9c8a76d5 aa105695

+2 -2
+2 -2
drivers/scsi/bnx2i/bnx2i_iscsi.c
··· 675 675 { 676 676 struct list_head *list; 677 677 struct list_head *tmp; 678 - struct bnx2i_endpoint *ep; 678 + struct bnx2i_endpoint *ep = NULL; 679 679 680 680 read_lock_bh(&hba->ep_rdwr_lock); 681 681 list_for_each_safe(list, tmp, &hba->ep_ofld_list) { ··· 703 703 { 704 704 struct list_head *list; 705 705 struct list_head *tmp; 706 - struct bnx2i_endpoint *ep; 706 + struct bnx2i_endpoint *ep = NULL; 707 707 708 708 read_lock_bh(&hba->ep_rdwr_lock); 709 709 list_for_each_safe(list, tmp, &hba->ep_destroy_list) {