Skip to contentSkip to conversation

mpt2sas: move the scsi_host_put to the right place

PATCH In review Tomas Henzl 2 participants 2 messages Apr 17, 2012 – Apr 20, 2012 SCSI

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 mpt2sas: move the scsi_host_put to the right place

When scsi_add_host fails the scsi_host_put should be called.

---

drivers/scsi/mpt2sas/mpt2sas_scsih.c +1 -1
index d953a57..0a256a3 100644
@@ -8061,8 +8061,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;
 }
 
#1 lore raw

This patch seem to be fine. Please consider this patch as Acked-by: "Nandigama, Nagalakshmi" <[email protected]>

Regards,
Nagalakshmi

-----Original Message-----
From: Tomas Henzl [mailto:[email protected]]
Sent: Tuesday, April 17, 2012 6:55 PM
To: '[email protected]'
Cc: Nandigama, Nagalakshmi
Subject: [PATCH] mpt2sas: move the scsi_host_put to the right place

When scsi_add_host fails the scsi_host_put should be called.

---

drivers/scsi/mpt2sas/mpt2sas_scsih.c +1 -1
index d953a57..0a256a3 100644
@@ -8061,8 +8061,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;
 }