|
@@ -8222,7 +8222,7 @@ static void process_waiting_list(struct ncb *np, int sts)
|
|
|
#ifdef DEBUG_WAITING_LIST
|
|
|
if (waiting_list) printk("%s: waiting_list=%lx processing sts=%d\n", ncr_name(np), (u_long) waiting_list, sts);
|
|
|
#endif
|
|
|
- while (wcmd = waiting_list) {
|
|
|
+ while ((wcmd = waiting_list) != NULL) {
|
|
|
waiting_list = (struct scsi_cmnd *) wcmd->next_wcmd;
|
|
|
wcmd->next_wcmd = NULL;
|
|
|
if (sts == DID_OK) {
|