summaryrefslogtreecommitdiff
path: root/drivers/bcma/main.c
diff options
context:
space:
mode:
authorJohn W. Linville <linville@tuxdriver.com>2012-10-19 13:55:42 -0400
committerJohn W. Linville <linville@tuxdriver.com>2012-10-19 13:55:42 -0400
commit06f40a41b80e25e88a2b612ea3b2a94f93c94f72 (patch)
treefa3bc4d691d7024425183bfc1be75a36c4e1d3f3 /drivers/bcma/main.c
parentdb0fe0b2f6bba2fda939737d063db2ae14c58d71 (diff)
parent290eddc4b3661dc4dfa95d199e0be5788928b3b1 (diff)
Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless into for-davem
Diffstat (limited to 'drivers/bcma/main.c')
-rw-r--r--drivers/bcma/main.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/drivers/bcma/main.c b/drivers/bcma/main.c
index 432aeeedfd5e..d865470bc951 100644
--- a/drivers/bcma/main.c
+++ b/drivers/bcma/main.c
@@ -158,9 +158,10 @@ static int bcma_register_cores(struct bcma_bus *bus)
static void bcma_unregister_cores(struct bcma_bus *bus)
{
- struct bcma_device *core;
+ struct bcma_device *core, *tmp;
- list_for_each_entry(core, &bus->cores, list) {
+ list_for_each_entry_safe(core, tmp, &bus->cores, list) {
+ list_del(&core->list);
if (core->dev_registered)
device_unregister(&core->dev);
}