Commit 130d5496 authored by Stefan Richter's avatar Stefan Richter

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: default avatarStefan Richter <stefanr@s5r6.in-berlin.de>
parent 43286568
...@@ -2286,8 +2286,6 @@ pci_probe(struct pci_dev *dev, const struct pci_device_id *ent) ...@@ -2286,8 +2286,6 @@ pci_probe(struct pci_dev *dev, const struct pci_device_id *ent)
int err; int err;
size_t size; size_t size;
ohci_pmac_on(dev);
ohci = kzalloc(sizeof(*ohci), GFP_KERNEL); ohci = kzalloc(sizeof(*ohci), GFP_KERNEL);
if (ohci == NULL) { if (ohci == NULL) {
fw_error("Could not malloc fw_ohci data.\n"); 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,6 +2294,8 @@ pci_probe(struct pci_dev *dev, const struct pci_device_id *ent)
fw_card_initialize(&ohci->card, &ohci_driver, &dev->dev); fw_card_initialize(&ohci->card, &ohci_driver, &dev->dev);
ohci_pmac_on(dev);
err = pci_enable_device(dev); err = pci_enable_device(dev);
if (err) { if (err) {
fw_error("Failed to enable OHCI hardware.\n"); 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,6 +2397,7 @@ pci_probe(struct pci_dev *dev, const struct pci_device_id *ent)
pci_disable_device(dev); pci_disable_device(dev);
fail_free: fail_free:
kfree(&ohci->card); kfree(&ohci->card);
ohci_pmac_off(dev);
return err; return err;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment