From: Stephen Cameron <stephenmcame...@gmail.com>

add error handling for failure when registering with SCSI subsystem.

Reviewed-by: Scott Teel <scott.t...@pmcs.com>
Reviewed-by: Kevin Barnett <kevin.barn...@pmcs.com>
Signed-off-by: Don Brace <don.br...@pmcs.com>
---
 drivers/scsi/hpsa.c |    3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/drivers/scsi/hpsa.c b/drivers/scsi/hpsa.c
index 361937a..d163440 100644
--- a/drivers/scsi/hpsa.c
+++ b/drivers/scsi/hpsa.c
@@ -7469,7 +7469,8 @@ reinit_after_soft_reset:
        h->access.set_intr_mask(h, HPSA_INTR_ON);
 
        hpsa_hba_inquiry(h);
-       hpsa_register_scsi(h);  /* hook ourselves into SCSI subsystem */
+       if (hpsa_register_scsi(h)) /* hook ourselves into SCSI subsystem */
+               goto clean4;
 
        /* Monitor the controller for firmware lockups */
        h->heartbeat_sample_interval = HEARTBEAT_SAMPLE_INTERVAL;

--
To unsubscribe from this list: send the line "unsubscribe linux-scsi" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to