From: Tomas Henzl Date: Tue, 17 Apr 2012 13:24:48 +0000 (+0200) Subject: [SCSI] mpt2sas: move the scsi_host_put to the right place X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=f555e05265657476da5839cdb478e8220eb9965d;p=GitHub%2Fexynos8895%2Fandroid_kernel_samsung_universal8895.git [SCSI] mpt2sas: move the scsi_host_put to the right place When scsi_add_host fails the scsi_host_put should be called. Signed-off-by: Tomas Henzl Acked-by: "Nandigama, Nagalakshmi" Signed-off-by: James Bottomley --- diff --git a/drivers/scsi/mpt2sas/mpt2sas_scsih.c b/drivers/scsi/mpt2sas/mpt2sas_scsih.c index f612d1dc7baf..76973e8ca4ba 100644 --- a/drivers/scsi/mpt2sas/mpt2sas_scsih.c +++ b/drivers/scsi/mpt2sas/mpt2sas_scsih.c @@ -8122,8 +8122,8 @@ _scsih_probe(struct pci_dev *pdev, const struct pci_device_id *id) out_thread_fail: list_del(&ioc->list); scsi_remove_host(shost); - scsi_host_put(shost); out_add_shost_fail: + scsi_host_put(shost); return -ENODEV; }