fedora core 6 1.2949 + vserver 2.2.0
[linux-2.6.git] / drivers / scsi / lpfc / lpfc_scsi.h
index acd64c4..cdcd253 100644 (file)
 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 :                             \