Skip to content

Commit

Permalink
mpt2sas: move the scsi_host_put to the right place
Browse files Browse the repository at this point in the history
When scsi_add_host fails the scsi_host_put should be called.

Signed-off-by: Tomas Henzl <[email protected]>
Acked-by: "Nandigama, Nagalakshmi" <[email protected]>
Signed-off-by: James Bottomley <[email protected]>
  • Loading branch information
thenzl authored and Pierre Carrier committed Dec 27, 2012
1 parent facdc4e commit ef5d078
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions drivers/scsi/mpt2sas/mpt2sas_scsih.c
Original file line number Diff line number Diff line change
Expand Up @@ -6107,6 +6107,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;
}

Expand Down

0 comments on commit ef5d078

Please sign in to comment.