aboutsummaryrefslogtreecommitdiff
path: root/drivers/scsi/lpfc/lpfc_scsi.h
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/scsi/lpfc/lpfc_scsi.h')
-rw-r--r--drivers/scsi/lpfc/lpfc_scsi.h5
1 files changed, 4 insertions, 1 deletions
diff --git a/drivers/scsi/lpfc/lpfc_scsi.h b/drivers/scsi/lpfc/lpfc_scsi.h
index acd64c49e84..cdcd2535803 100644
--- a/drivers/scsi/lpfc/lpfc_scsi.h
+++ b/drivers/scsi/lpfc/lpfc_scsi.h
@@ -23,10 +23,13 @@
struct lpfc_hba;
#define list_remove_head(list, entry, type, member) \
+ do { \
+ entry = NULL; \
if (!list_empty(list)) { \
entry = list_entry((list)->next, type, member); \
list_del_init(&entry->member); \
- }
+ } \
+ } while(0)
#define list_get_first(list, type, member) \
(list_empty(list)) ? NULL : \