diff options
author | Moore, Eric Dean <Eric.Moore@lsil.com> | 2005-11-16 20:54:17 -0500 |
---|---|---|
committer | James Bottomley <jejb@mulgrave.(none)> | 2005-12-13 20:38:44 -0500 |
commit | 7acec1e7556a861416bb6b10f3e3cbb6e82fc01d (patch) | |
tree | 3ca770f11ae152cd17af2a2032f2b13d0370d114 /drivers/message/fusion/mptfc.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/mptfc.c')
-rw-r--r-- | drivers/message/fusion/mptfc.c | 17 |
1 files changed, 10 insertions, 7 deletions
diff --git a/drivers/message/fusion/mptfc.c b/drivers/message/fusion/mptfc.c index 101993f21333..531664f9e339 100644 --- a/drivers/message/fusion/mptfc.c +++ b/drivers/message/fusion/mptfc.c | |||
@@ -168,13 +168,15 @@ mptfc_probe(struct pci_dev *pdev, const struct pci_device_id *id) | |||
168 | printk(MYIOC_s_WARN_FMT | 168 | printk(MYIOC_s_WARN_FMT |
169 | "Skipping because it's not operational!\n", | 169 | "Skipping because it's not operational!\n", |
170 | ioc->name); | 170 | ioc->name); |
171 | return -ENODEV; | 171 | error = -ENODEV; |
172 | goto out_mptfc_probe; | ||
172 | } | 173 | } |
173 | 174 | ||
174 | if (!ioc->active) { | 175 | if (!ioc->active) { |
175 | printk(MYIOC_s_WARN_FMT "Skipping because it's disabled!\n", | 176 | printk(MYIOC_s_WARN_FMT "Skipping because it's disabled!\n", |
176 | ioc->name); | 177 | ioc->name); |
177 | return -ENODEV; | 178 | error = -ENODEV; |
179 | goto out_mptfc_probe; | ||
178 | } | 180 | } |
179 | 181 | ||
180 | /* Sanity check - ensure at least 1 port is INITIATOR capable | 182 | /* Sanity check - ensure at least 1 port is INITIATOR capable |
@@ -199,7 +201,8 @@ mptfc_probe(struct pci_dev *pdev, const struct pci_device_id *id) | |||
199 | printk(MYIOC_s_WARN_FMT | 201 | printk(MYIOC_s_WARN_FMT |
200 | "Unable to register controller with SCSI subsystem\n", | 202 | "Unable to register controller with SCSI subsystem\n", |
201 | ioc->name); | 203 | ioc->name); |
202 | return -1; | 204 | error = -1; |
205 | goto out_mptfc_probe; | ||
203 | } | 206 | } |
204 | 207 | ||
205 | spin_lock_irqsave(&ioc->FreeQlock, flags); | 208 | spin_lock_irqsave(&ioc->FreeQlock, flags); |
@@ -267,7 +270,7 @@ mptfc_probe(struct pci_dev *pdev, const struct pci_device_id *id) | |||
267 | mem = kmalloc(sz, GFP_ATOMIC); | 270 | mem = kmalloc(sz, GFP_ATOMIC); |
268 | if (mem == NULL) { | 271 | if (mem == NULL) { |
269 | error = -ENOMEM; | 272 | error = -ENOMEM; |
270 | goto mptfc_probe_failed; | 273 | goto out_mptfc_probe; |
271 | } | 274 | } |
272 | 275 | ||
273 | memset(mem, 0, sz); | 276 | memset(mem, 0, sz); |
@@ -285,7 +288,7 @@ mptfc_probe(struct pci_dev *pdev, const struct pci_device_id *id) | |||
285 | mem = kmalloc(sz, GFP_ATOMIC); | 288 | mem = kmalloc(sz, GFP_ATOMIC); |
286 | if (mem == NULL) { | 289 | if (mem == NULL) { |
287 | error = -ENOMEM; | 290 | error = -ENOMEM; |
288 | goto mptfc_probe_failed; | 291 | goto out_mptfc_probe; |
289 | } | 292 | } |
290 | 293 | ||
291 | memset(mem, 0, sz); | 294 | memset(mem, 0, sz); |
@@ -331,13 +334,13 @@ mptfc_probe(struct pci_dev *pdev, const struct pci_device_id *id) | |||
331 | if(error) { | 334 | if(error) { |
332 | dprintk((KERN_ERR MYNAM | 335 | dprintk((KERN_ERR MYNAM |
333 | "scsi_add_host failed\n")); | 336 | "scsi_add_host failed\n")); |
334 | goto mptfc_probe_failed; | 337 | goto out_mptfc_probe; |
335 | } | 338 | } |
336 | 339 | ||
337 | scsi_scan_host(sh); | 340 | scsi_scan_host(sh); |
338 | return 0; | 341 | return 0; |
339 | 342 | ||
340 | mptfc_probe_failed: | 343 | out_mptfc_probe: |
341 | 344 | ||
342 | mptscsih_remove(pdev); | 345 | mptscsih_remove(pdev); |
343 | return error; | 346 | return error; |