]> git.karo-electronics.de Git - mv-sheeva.git/blobdiff - drivers/acpi/pci_root.c
Pull bugfix into test branch
[mv-sheeva.git] / drivers / acpi / pci_root.c
index 03e03741c1404309d0888258ec1ec34253b7d141..b9c52cdbf6587bc641026b123cb0d82625b42493 100644 (file)
@@ -98,11 +98,12 @@ void acpi_pci_unregister_driver(struct acpi_pci_driver *driver)
 
        struct acpi_pci_driver **pptr = &sub_driver;
        while (*pptr) {
-               if (*pptr != driver)
-                       continue;
-               *pptr = (*pptr)->next;
-               break;
+               if (*pptr == driver)
+                       break;
+               pptr = &(*pptr)->next;
        }
+       BUG_ON(!*pptr);
+       *pptr = (*pptr)->next;
 
        if (!driver->remove)
                return;