From mboxrd@z Thu Jan 1 00:00:00 1970 From: Don Brace Subject: [PATCH v3 10/42] hpsa: do not ignore return value of hpsa_register_scsi Date: Tue, 17 Mar 2015 15:03:18 -0500 Message-ID: <20150317200318.19856.48049.stgit@brunhilda> References: <20150317200139.19856.87982.stgit@brunhilda> Mime-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit Return-path: Received: from g4t3426.houston.hp.com ([15.201.208.54]:37778 "EHLO g4t3426.houston.hp.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932159AbbCQUE6 (ORCPT ); Tue, 17 Mar 2015 16:04:58 -0400 In-Reply-To: <20150317200139.19856.87982.stgit@brunhilda> Sender: linux-scsi-owner@vger.kernel.org List-Id: linux-scsi@vger.kernel.org To: scott.teel@pmcs.com, Kevin.Barnett@pmcs.com, james.bottomley@parallels.com, hch@infradead.org, Justin.Lindley@pmcs.com, brace@pmcs.com Cc: linux-scsi@vger.kernel.org From: Stephen Cameron add error handling for failure when registering with SCSI subsystem. Reviewed-by: Scott Teel Reviewed-by: Kevin Barnett Signed-off-by: Don Brace --- drivers/scsi/hpsa.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/drivers/scsi/hpsa.c b/drivers/scsi/hpsa.c index d57fa4b..15bf3bcb 100644 --- a/drivers/scsi/hpsa.c +++ b/drivers/scsi/hpsa.c @@ -7453,7 +7453,9 @@ 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 */ + rc = hpsa_register_scsi(h); /* hook ourselves into SCSI subsystem */ + if (rc) + goto clean4; /* Monitor the controller for firmware lockups */ h->heartbeat_sample_interval = HEARTBEAT_SAMPLE_INTERVAL;