[PATCH 38/43] hpsa: clean up new block layer tag error handling

Don Brace
2015-02-21T22:22:13Z

From: Robert Elliott <elliott@hp.com>

clean up new block layer tag error handling

Reviewed-by: Scott Teel <scott.teel@pmcs.com>
Reviewed-by: Kevin Barnett <kevin.barnett@pmcs.com>
Signed-off-by: Robert Elliott <elliott@hp.com>
Signed-off-by: Don Brace <don.brace@pmcs.com>
---
drivers/scsi/hpsa.c | 13 +++++++++----
1 file changed, 9 insertions(+), 4 deletions(-)

diff --git a/drivers/scsi/hpsa.c b/drivers/scsi/hpsa.c
index 8f1b0e6..c491bed 100644
--- a/drivers/scsi/hpsa.c
+++ b/drivers/scsi/hpsa.c
@@ -4854,18 +4854,23 @@ static int hpsa_register_scsi(struct ctlr_info *h)
sh->unique_id = sh->irq;
if (!shost_use_blk_mq(sh)) {
error = scsi_init_shared_tag_map(sh, sh->can_queue);
- if (error)
+ if (error) {
+ dev_err(&h->pdev->dev,
+ "%s: scsi_init_shared_tag_map failed for controller %d\n",
+ __func__, h->ctlr);
goto fail_host_put;
+ }
}
error = scsi_add_host(sh, &h->pdev->dev);
- if (error)
+ if (error) {
+ dev_err(&h->pdev->dev, "%s: scsi_add_host failed for controller %d\n",
+ __func__, h->ctlr);
goto fail_host_put;
+ }
scsi_scan_host(sh);
return 0;

fail_host_put:
- dev_err(&h->pdev->dev, "%s: scsi_add_host"
- " failed for controller %d\n", __func__, h->ctlr);
scsi_host_put(sh);
return error;