summaryrefslogtreecommitdiffstats
path: root/drivers/staging/greybus/audio_manager.c
diff options
context:
space:
mode:
authorVaibhav Agarwal <vaibhav.agarwal@linaro.org>2016-05-17 22:29:08 +0530
committerGreg Kroah-Hartman <gregkh@google.com>2016-05-18 16:33:31 -0700
commitac00154a7c6a8f3b2a98c1cf3cef893af2b0abac (patch)
tree0ea92c2f64f91ecee921ad7b83e031cde1a9e426 /drivers/staging/greybus/audio_manager.c
parentef62adae82524c745640850f62ab0dfe0b580c9f (diff)
downloadlinux-ac00154a7c6a8f3b2a98c1cf3cef893af2b0abac.tar.bz2
greybus: audio: gb_manager: Use valid argument while removing ida allocated id.
module->id is used as an argument to ida_simple_remove(). Since module is already dereferenced, module->id might contain invalid data. So fix this. Fixes: da4cc2d0b066 ("audio:gb_manager: Use proper locking around kobject_xxx") Signed-off-by: Vaibhav Agarwal <vaibhav.agarwal@linaro.org> Reviewed-by: Mark Greer <mgreer@animalcreek.com> Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
Diffstat (limited to 'drivers/staging/greybus/audio_manager.c')
-rw-r--r--drivers/staging/greybus/audio_manager.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/staging/greybus/audio_manager.c b/drivers/staging/greybus/audio_manager.c
index 9def014cd47c..aa6508b44fab 100644
--- a/drivers/staging/greybus/audio_manager.c
+++ b/drivers/staging/greybus/audio_manager.c
@@ -76,7 +76,7 @@ int gb_audio_manager_remove(int id)
list_del(&module->list);
kobject_put(&module->kobj);
up_write(&modules_rwsem);
- ida_simple_remove(&module_id, module->id);
+ ida_simple_remove(&module_id, id);
return 0;
}
EXPORT_SYMBOL_GPL(gb_audio_manager_remove);