We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent d4fa14c commit 1fffa90Copy full SHA for 1fffa90
drivers/bcma/main.c
@@ -158,9 +158,10 @@ static int bcma_register_cores(struct bcma_bus *bus)
158
159
static void bcma_unregister_cores(struct bcma_bus *bus)
160
{
161
- struct bcma_device *core;
+ struct bcma_device *core, *tmp;
162
163
- list_for_each_entry(core, &bus->cores, list) {
+ list_for_each_entry_safe(core, tmp, &bus->cores, list) {
164
+ list_del(&core->list);
165
if (core->dev_registered)
166
device_unregister(&core->dev);
167
}
0 commit comments