[SCSI] qla4xxx: Break the loop if the sendtargets list was empty
Signed-off-by: Nilesh Javali <nilesh.javali@qlogic.com> Signed-off-by: Vikas Chaudhary <vikas.chaudhary@qlogic.com> Signed-off-by: James Bottomley <JBottomley@Parallels.com>
This commit is contained in:
parent
c28eaaca7a
commit
f1f2e60e1a
@ -4242,6 +4242,9 @@ void qla4xxx_build_ddb_list(struct scsi_qla_host *ha, int is_reset)
|
|||||||
|
|
||||||
wtime = jiffies + (HZ * tmo);
|
wtime = jiffies + (HZ * tmo);
|
||||||
do {
|
do {
|
||||||
|
if (list_empty(&list_st))
|
||||||
|
break;
|
||||||
|
|
||||||
qla4xxx_remove_failed_ddb(ha, &list_st);
|
qla4xxx_remove_failed_ddb(ha, &list_st);
|
||||||
schedule_timeout_uninterruptible(HZ / 10);
|
schedule_timeout_uninterruptible(HZ / 10);
|
||||||
} while (time_after(wtime, jiffies));
|
} while (time_after(wtime, jiffies));
|
||||||
|
Loading…
Reference in New Issue
Block a user