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/mptsas.c | |
parent | f78496da6a85f4b5f4532d7bf85b05fa655146a8 (diff) |
[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/mptsas.c')
-rw-r--r-- | drivers/message/fusion/mptsas.c | 17 |
1 files changed, 10 insertions, 7 deletions
diff --git a/drivers/message/fusion/mptsas.c b/drivers/message/fusion/mptsas.c index 0e557a3a9d0..282fb5ebbad 100644 --- a/drivers/message/fusion/mptsas.c +++ b/drivers/message/fusion/mptsas.c @@ -1134,13 +1134,15 @@ mptsas_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_mptsas_probe; } if (!ioc->active) { printk(MYIOC_s_WARN_FMT "Skipping because it's disabled!\n", ioc->name); - return -ENODEV; + error = -ENODEV; + goto out_mptsas_probe; } /* Sanity check - ensure at least 1 port is INITIATOR capable @@ -1164,7 +1166,8 @@ mptsas_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_mptsas_probe; } spin_lock_irqsave(&ioc->FreeQlock, flags); @@ -1238,7 +1241,7 @@ mptsas_probe(struct pci_dev *pdev, const struct pci_device_id *id) mem = kmalloc(sz, GFP_ATOMIC); if (mem == NULL) { error = -ENOMEM; - goto mptsas_probe_failed; + goto out_mptsas_probe; } memset(mem, 0, sz); @@ -1256,7 +1259,7 @@ mptsas_probe(struct pci_dev *pdev, const struct pci_device_id *id) mem = kmalloc(sz, GFP_ATOMIC); if (mem == NULL) { error = -ENOMEM; - goto mptsas_probe_failed; + goto out_mptsas_probe; } memset(mem, 0, sz); @@ -1309,14 +1312,14 @@ mptsas_probe(struct pci_dev *pdev, const struct pci_device_id *id) if (error) { dprintk((KERN_ERR MYNAM "scsi_add_host failed\n")); - goto mptsas_probe_failed; + goto out_mptsas_probe; } mptsas_scan_sas_topology(ioc); return 0; -mptsas_probe_failed: +out_mptsas_probe: mptscsih_remove(pdev); return error; |