diff options
author | Stefan Richter <stefanr@s5r6.in-berlin.de> | 2008-03-24 15:55:28 -0400 |
---|---|---|
committer | Stefan Richter <stefanr@s5r6.in-berlin.de> | 2008-04-18 11:55:34 -0400 |
commit | 130d5496e2c9104dcabdaa5c19cd941770e20edc (patch) | |
tree | 5784c92dbe125f2e9c34edd48521c86be07e3fae /drivers/firewire | |
parent | 43286568adb3ccd4b2f1d0cb7393c355f03e4f39 (diff) |
firewire: fw-ohci: missing PPC PMac feature calls in failure path
Balance ohci_pmac_on and ohci_pmac_off if pci_driver.probe fails.
Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
Diffstat (limited to 'drivers/firewire')
-rw-r--r-- | drivers/firewire/fw-ohci.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/drivers/firewire/fw-ohci.c b/drivers/firewire/fw-ohci.c index 533788f227dc..973e762efc24 100644 --- a/drivers/firewire/fw-ohci.c +++ b/drivers/firewire/fw-ohci.c | |||
@@ -2286,8 +2286,6 @@ pci_probe(struct pci_dev *dev, const struct pci_device_id *ent) | |||
2286 | int err; | 2286 | int err; |
2287 | size_t size; | 2287 | size_t size; |
2288 | 2288 | ||
2289 | ohci_pmac_on(dev); | ||
2290 | |||
2291 | ohci = kzalloc(sizeof(*ohci), GFP_KERNEL); | 2289 | ohci = kzalloc(sizeof(*ohci), GFP_KERNEL); |
2292 | if (ohci == NULL) { | 2290 | if (ohci == NULL) { |
2293 | fw_error("Could not malloc fw_ohci data.\n"); | 2291 | fw_error("Could not malloc fw_ohci data.\n"); |
@@ -2296,6 +2294,8 @@ pci_probe(struct pci_dev *dev, const struct pci_device_id *ent) | |||
2296 | 2294 | ||
2297 | fw_card_initialize(&ohci->card, &ohci_driver, &dev->dev); | 2295 | fw_card_initialize(&ohci->card, &ohci_driver, &dev->dev); |
2298 | 2296 | ||
2297 | ohci_pmac_on(dev); | ||
2298 | |||
2299 | err = pci_enable_device(dev); | 2299 | err = pci_enable_device(dev); |
2300 | if (err) { | 2300 | if (err) { |
2301 | fw_error("Failed to enable OHCI hardware.\n"); | 2301 | fw_error("Failed to enable OHCI hardware.\n"); |
@@ -2397,6 +2397,7 @@ pci_probe(struct pci_dev *dev, const struct pci_device_id *ent) | |||
2397 | pci_disable_device(dev); | 2397 | pci_disable_device(dev); |
2398 | fail_free: | 2398 | fail_free: |
2399 | kfree(&ohci->card); | 2399 | kfree(&ohci->card); |
2400 | ohci_pmac_off(dev); | ||
2400 | 2401 | ||
2401 | return err; | 2402 | return err; |
2402 | } | 2403 | } |