ieee1394: ohci1394: missing PPC PMac feature calls in failure path
authorStefan Richter <stefanr@s5r6.in-berlin.de>
Mon, 24 Mar 2008 19:53:34 +0000 (20:53 +0100)
committerStefan Richter <stefanr@s5r6.in-berlin.de>
Fri, 18 Apr 2008 15:55:31 +0000 (17:55 +0200)
The failure path of ohci1394_pci_probe() reuses ohci1394_pci_remove().
Doing so it missed to call ohci1394_pmac_off() in a few unlikely early
error cases.

Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
drivers/ieee1394/ohci1394.c

index 9e304c3cea229e77f4f9d3a46aa28878fd4f89c2..0690469fcecf9acfdb53ce4140c5ba4e5c99dd9a 100644 (file)
@@ -3242,7 +3242,7 @@ static void ohci1394_pci_remove(struct pci_dev *dev)
 
        ohci = pci_get_drvdata(dev);
        if (!ohci)
-               return;
+               goto out;
 
        device = get_device(&ohci->host->device);
 
@@ -3305,14 +3305,14 @@ static void ohci1394_pci_remove(struct pci_dev *dev)
                release_mem_region(pci_resource_start(dev, 0),
                                   OHCI1394_REGISTER_SIZE);
 
-               ohci1394_pmac_off(dev);
-
        case OHCI_INIT_ALLOC_HOST:
                pci_set_drvdata(dev, NULL);
        }
 
        if (device)
                put_device(device);
+out:
+       ohci1394_pmac_off(dev);
 }
 
 #ifdef CONFIG_PM