summaryrefslogtreecommitdiffstats
path: root/drivers/firewire
diff options
context:
space:
mode:
authorStefan Richter <stefanr@s5r6.in-berlin.de>2008-03-24 20:55:28 +0100
committerStefan Richter <stefanr@s5r6.in-berlin.de>2008-04-18 17:55:34 +0200
commit130d5496e2c9104dcabdaa5c19cd941770e20edc (patch)
tree5784c92dbe125f2e9c34edd48521c86be07e3fae /drivers/firewire
parent43286568adb3ccd4b2f1d0cb7393c355f03e4f39 (diff)
downloadop-kernel-dev-130d5496e2c9104dcabdaa5c19cd941770e20edc.zip
op-kernel-dev-130d5496e2c9104dcabdaa5c19cd941770e20edc.tar.gz
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.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/drivers/firewire/fw-ohci.c b/drivers/firewire/fw-ohci.c
index 533788f..973e762 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)
int err;
size_t size;
- ohci_pmac_on(dev);
-
ohci = kzalloc(sizeof(*ohci), GFP_KERNEL);
if (ohci == NULL) {
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)
fw_card_initialize(&ohci->card, &ohci_driver, &dev->dev);
+ ohci_pmac_on(dev);
+
err = pci_enable_device(dev);
if (err) {
fw_error("Failed to enable OHCI hardware.\n");
@@ -2397,6 +2397,7 @@ pci_probe(struct pci_dev *dev, const struct pci_device_id *ent)
pci_disable_device(dev);
fail_free:
kfree(&ohci->card);
+ ohci_pmac_off(dev);
return err;
}
OpenPOWER on IntegriCloud