diff options
Diffstat (limited to 'drivers/acpi/pci_root.c')
-rw-r--r-- | drivers/acpi/pci_root.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/drivers/acpi/pci_root.c b/drivers/acpi/pci_root.c index 03e03741c140..b9c52cdbf658 100644 --- a/drivers/acpi/pci_root.c +++ b/drivers/acpi/pci_root.c | |||
@@ -98,11 +98,12 @@ void acpi_pci_unregister_driver(struct acpi_pci_driver *driver) | |||
98 | 98 | ||
99 | struct acpi_pci_driver **pptr = &sub_driver; | 99 | struct acpi_pci_driver **pptr = &sub_driver; |
100 | while (*pptr) { | 100 | while (*pptr) { |
101 | if (*pptr != driver) | 101 | if (*pptr == driver) |
102 | continue; | 102 | break; |
103 | *pptr = (*pptr)->next; | 103 | pptr = &(*pptr)->next; |
104 | break; | ||
105 | } | 104 | } |
105 | BUG_ON(!*pptr); | ||
106 | *pptr = (*pptr)->next; | ||
106 | 107 | ||
107 | if (!driver->remove) | 108 | if (!driver->remove) |
108 | return; | 109 | return; |