diff options
author | Moore, Eric Dean <Eric.Moore@lsil.com> | 2005-11-16 18:54:17 -0700 |
---|---|---|
committer | James Bottomley <jejb@mulgrave.(none)> | 2005-12-13 18:38:44 -0700 |
commit | 7acec1e7556a861416bb6b10f3e3cbb6e82fc01d (patch) | |
tree | 3ca770f11ae152cd17af2a2032f2b13d0370d114 /drivers/message/fusion/mptspi.c | |
parent | f78496da6a85f4b5f4532d7bf85b05fa655146a8 (diff) | |
download | talos-op-linux-7acec1e7556a861416bb6b10f3e3cbb6e82fc01d.tar.gz talos-op-linux-7acec1e7556a861416bb6b10f3e3cbb6e82fc01d.zip |
[SCSI] mptfusion - cleaning up xxx_probe error handling
This cleans the returning failure conditions of the
mptsas/mptfc/mptspi probe routines.
Signed-off-by: Eric Moore <Eric.Moore@lsil.com>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
Diffstat (limited to 'drivers/message/fusion/mptspi.c')
-rw-r--r-- | drivers/message/fusion/mptspi.c | 17 |
1 files changed, 10 insertions, 7 deletions
diff --git a/drivers/message/fusion/mptspi.c b/drivers/message/fusion/mptspi.c index 9431d386c72a..91bc467477ef 100644 --- a/drivers/message/fusion/mptspi.c +++ b/drivers/message/fusion/mptspi.c @@ -178,13 +178,15 @@ mptspi_probe(struct pci_dev *pdev, const struct pci_device_id *id) printk(MYIOC_s_WARN_FMT "Skipping because it's not operational!\n", ioc->name); - return -ENODEV; + error = -ENODEV; + goto out_mptspi_probe; } if (!ioc->active) { printk(MYIOC_s_WARN_FMT "Skipping because it's disabled!\n", ioc->name); - return -ENODEV; + error = -ENODEV; + goto out_mptspi_probe; } /* Sanity check - ensure at least 1 port is INITIATOR capable @@ -209,7 +211,8 @@ mptspi_probe(struct pci_dev *pdev, const struct pci_device_id *id) printk(MYIOC_s_WARN_FMT "Unable to register controller with SCSI subsystem\n", ioc->name); - return -1; + error = -1; + goto out_mptspi_probe; } spin_lock_irqsave(&ioc->FreeQlock, flags); @@ -287,7 +290,7 @@ mptspi_probe(struct pci_dev *pdev, const struct pci_device_id *id) mem = kmalloc(sz, GFP_ATOMIC); if (mem == NULL) { error = -ENOMEM; - goto mptspi_probe_failed; + goto out_mptspi_probe; } memset(mem, 0, sz); @@ -305,7 +308,7 @@ mptspi_probe(struct pci_dev *pdev, const struct pci_device_id *id) mem = kmalloc(sz, GFP_ATOMIC); if (mem == NULL) { error = -ENOMEM; - goto mptspi_probe_failed; + goto out_mptspi_probe; } memset(mem, 0, sz); @@ -386,13 +389,13 @@ mptspi_probe(struct pci_dev *pdev, const struct pci_device_id *id) if(error) { dprintk((KERN_ERR MYNAM "scsi_add_host failed\n")); - goto mptspi_probe_failed; + goto out_mptspi_probe; } scsi_scan_host(sh); return 0; -mptspi_probe_failed: +out_mptspi_probe: mptscsih_remove(pdev); return error; |