Gitweb: http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=f10bb2544bab75b3e8df15a7b51a833c78cbd77f Commit: f10bb2544bab75b3e8df15a7b51a833c78cbd77f Parent: 9185cfa92507d07ac787bc73d06c42222eec7239 Author: Akinobu Mita <[EMAIL PROTECTED]> AuthorDate: Tue Dec 19 12:56:09 2006 -0800 Committer: Len Brown <[EMAIL PROTECTED]> CommitDate: Wed Dec 20 00:30:48 2006 -0500
ACPI: fix single linked list manipulation Fix single linked list manipulation for sub_driver. If the remving entry is not on the head of the sub_driver list, it goes into infinate loop. Though that infinite loop doesn't happen. Because the only user of acpi_pci_register_dirver() is acpiphp. Signed-off-by: Akinobu Mita <[EMAIL PROTECTED]> Signed-off-by: Andrew Morton <[EMAIL PROTECTED]> Signed-off-by: Len Brown <[EMAIL PROTECTED]> --- 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 0984a1e..c92c144 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; - To unsubscribe from this list: send the line "unsubscribe git-commits-head" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html