[SCSI] hpsa: increase the probability of a reported success after a device reset
authorTomas Henzl <thenzl@redhat.com>
Fri, 21 Feb 2014 22:25:05 +0000 (16:25 -0600)
committerJames Bottomley <JBottomley@Parallels.com>
Sat, 15 Mar 2014 17:19:23 +0000 (10:19 -0700)
rc is set in the loop, and it isn't set back to zero anywhere
this patch fixes it

Signed-off-by: Tomas Henzl <thenzl@redhat.com>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
drivers/scsi/hpsa.c

index 6e5e693..388e229 100644 (file)
@@ -4142,7 +4142,7 @@ static int hpsa_register_scsi(struct ctlr_info *h)
 static int wait_for_device_to_become_ready(struct ctlr_info *h,
        unsigned char lunaddr[])
 {
-       int rc = 0;
+       int rc;
        int count = 0;
        int waittime = 1; /* seconds */
        struct CommandList *c;
@@ -4162,6 +4162,7 @@ static int wait_for_device_to_become_ready(struct ctlr_info *h,
                 */
                msleep(1000 * waittime);
                count++;
+               rc = 0; /* Device ready. */
 
                /* Increase wait time with each try, up to a point. */
                if (waittime < HPSA_MAX_WAIT_INTERVAL_SECS)