Skip to contentSkip to conversation

mpt2sas: fix failure path

PATCH New Tomas Henzl 1 participant 1 message May 2, 2011 SCSI

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 mpt2sas: fix failure path

host allocated with scsi_host_alloc should be freed when init fails

---

drivers/scsi/mpt2sas/mpt2sas_scsih.c +1 -0
index 16e99b6..1cb48ab 100644
@@ -6985,6 +6985,7 @@ _scsih_probe(struct pci_dev *pdev, const struct pci_device_id *id)
 	list_del(&ioc->list);
 	scsi_remove_host(shost);
  out_add_shost_fail:
+	scsi_host_put(shost);
 	return -ENODEV;
 }