Skip to content

Commit

Permalink
firewire: fw-ohci: missing PPC PMac feature calls in failure path
Browse files Browse the repository at this point in the history
Balance ohci_pmac_on and ohci_pmac_off if pci_driver.probe fails.

Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
  • Loading branch information
Stefan Richter committed Apr 18, 2008
1 parent 4328656 commit 130d549
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions drivers/firewire/fw-ohci.c
Original file line number Diff line number Diff line change
Expand Up @@ -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");
Expand All @@ -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");
Expand Down Expand Up @@ -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;
}
Expand Down

0 comments on commit 130d549

Please sign in to comment.