]> err.no Git - linux-2.6/commitdiff
firewire: fw-ohci: missing PPC PMac feature calls in failure path
authorStefan Richter <stefanr@s5r6.in-berlin.de>
Mon, 24 Mar 2008 19:55:28 +0000 (20:55 +0100)
committerStefan Richter <stefanr@s5r6.in-berlin.de>
Fri, 18 Apr 2008 15:55:34 +0000 (17:55 +0200)
Balance ohci_pmac_on and ohci_pmac_off if pci_driver.probe fails.

Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
drivers/firewire/fw-ohci.c

index 533788f227dcd761f51ef28fafd26e052d04c75a..973e762efc24a5759bb8dcf389e50bc795c696d7 100644 (file)
@@ -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;
 }