[SCSI] qla4xxx: honor return status of qla4xxx_hw_reset
authorVikas Chaudhary <vikas.chaudhary@qlogic.com>
Thu, 7 Oct 2010 05:48:07 +0000 (22:48 -0700)
committerJames Bottomley <James.Bottomley@suse.de>
Mon, 25 Oct 2010 19:48:58 +0000 (14:48 -0500)
Signed-off-by: Vikas Chaudhary <vikas.chaudhary@qlogic.com>
Signed-off-by: Ravi Anand <ravi.anand@qlogic.com>
Reviewed-by: Mike Christie <michaelc@cs.wisc.edu>
Signed-off-by: James Bottomley <James.Bottomley@suse.de>
drivers/scsi/qla4xxx/ql4_os.c

index b24bf969b8a90220893972fb59b39308c17d6fac..6e59b59602a1698091368e7c927875690ca3b2de 100644 (file)
@@ -935,11 +935,14 @@ int qla4xxx_soft_reset(struct scsi_qla_host *ha)
 {
        uint32_t max_wait_time;
        unsigned long flags = 0;
-       int status = QLA_ERROR;
+       int status;
        uint32_t ctrl_status;
 
-       qla4xxx_hw_reset(ha);
+       status = qla4xxx_hw_reset(ha);
+       if (status != QLA_SUCCESS)
+               return status;
 
+       status = QLA_ERROR;
        /* Wait until the Network Reset Intr bit is cleared */
        max_wait_time = RESET_INTR_TOV;
        do {