aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/acpi/pci_root.c
diff options
context:
space:
mode:
authorLen Brown <len.brown@intel.com>2006-12-20 02:52:50 -0500
committerLen Brown <len.brown@intel.com>2006-12-20 02:52:50 -0500
commit3be11c8f4f2fa194834c2e83540f34da442b8977 (patch)
tree35386fe97c1dd62a261c297512b8e5137b56c35d /drivers/acpi/pci_root.c
parentPull ec into test branch (diff)
parentACPI: Kconfig - depend on PM rather than selecting it (diff)
downloadlinux-dev-3be11c8f4f2fa194834c2e83540f34da442b8977.tar.xz
linux-dev-3be11c8f4f2fa194834c2e83540f34da442b8977.zip
Pull bugfix into test branch
Diffstat (limited to 'drivers/acpi/pci_root.c')
-rw-r--r--drivers/acpi/pci_root.c9
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)
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;