greybus: audio: Fix incorrect counting of 'ida'
authorDinko Mironov <dmironov@mm-sol.com>
Thu, 5 May 2016 16:58:22 +0000 (19:58 +0300)
committerGreg Kroah-Hartman <gregkh@google.com>
Thu, 5 May 2016 20:33:20 +0000 (13:33 -0700)
Function gb_audio_manager_remove_all() to remove all audio modules,
doesn't control correctly 'ida' counting.

Signed-off-by: Dinko Mironov <dmironov@mm-sol.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
drivers/staging/greybus/audio_manager.c

index 619bdee46ee5df9eb79e215b0c00c3ca2f367aad..9def014cd47c7f152770dc63fc908687597316ef 100644 (file)
@@ -91,6 +91,7 @@ void gb_audio_manager_remove_all(void)
        list_for_each_entry_safe(module, next, &modules_list, list) {
                list_del(&module->list);
                kobject_put(&module->kobj);
+               ida_simple_remove(&module_id, module->id);
        }
 
        is_empty = list_empty(&modules_list);