diff options
author | Nilesh Javali <nilesh.javali@qlogic.com> | 2011-12-16 01:58:57 -0800 |
---|---|---|
committer | James Bottomley <JBottomley@Parallels.com> | 2012-01-10 17:01:22 -0600 |
commit | f1f2e60e1a2320d0ce11102b72b15d5dedb29fe2 (patch) | |
tree | 0da20240c8b7717ef18faeebe21a4f11af21e008 | |
parent | c28eaaca7acea214937fb9b3ae45e001d49947bf (diff) |
[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>
-rw-r--r-- | drivers/scsi/qla4xxx/ql4_os.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/scsi/qla4xxx/ql4_os.c b/drivers/scsi/qla4xxx/ql4_os.c index 09b28f8513a..ae5d512bf43 100644 --- a/drivers/scsi/qla4xxx/ql4_os.c +++ b/drivers/scsi/qla4xxx/ql4_os.c @@ -4242,6 +4242,9 @@ void qla4xxx_build_ddb_list(struct scsi_qla_host *ha, int is_reset) wtime = jiffies + (HZ * tmo); do { + if (list_empty(&list_st)) + break; + qla4xxx_remove_failed_ddb(ha, &list_st); schedule_timeout_uninterruptible(HZ / 10); } while (time_after(wtime, jiffies)); |