mpt3sas, mpt2sas: fix scsi_add_host error handling problems in _scsih_probe
authorSreekanth Reddy <sreekanth.reddy@avagotech.com>
Fri, 12 Sep 2014 10:05:33 +0000 (15:35 +0530)
committerChristoph Hellwig <hch@lst.de>
Tue, 16 Sep 2014 16:14:21 +0000 (09:14 -0700)
commitb65f1d4da7df44835bd0a2452332e253a5c66d9b
tree717540635f65dfb07055b5df1e7e2df087252db0
parent70d8c86ebeaca552801500d20d5f2c6cc235cabd
mpt3sas, mpt2sas: fix scsi_add_host error handling problems in _scsih_probe

In _scsih_probe, propagate the return value from scsi_add_host.
In mpt3sas, avoid calling list_del twice if that returns an
error, which causes list_del corruption warnings if an error
is returned.

Tested with blk-mq and scsi-mq patches to properly cleanup
from and propagate blk_mq_init_rq_map errors.

Signed-off-by: Robert Elliott <elliott@hp.com>
Acked-by: Sreekanth Reddy <Sreekanth.Reddy@avagotech.com>
Signed-off-by: Christoph Hellwig <hch@lst.de>
drivers/scsi/mpt2sas/mpt2sas_scsih.c
drivers/scsi/mpt3sas/mpt3sas_scsih.c