mirror of
https://github.com/FEX-Emu/linux.git
synced 2025-01-09 11:00:52 +00:00
staging: greybus: audio_manager: fix a missing check of ida_simple_get
ida_simple_get could fail. The fix inserts a check for its return value. Signed-off-by: Kangjie Lu <kjlu@umn.edu> Reviewed-by: Vaibhav Agarwal <vaibhav.sr@gmail.com> Acked-by: Viresh Kumar <viresh.kumar@linaro.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
parent
d5cac52c09
commit
b5af36e3e5
@ -45,6 +45,9 @@ int gb_audio_manager_add(struct gb_audio_manager_module_descriptor *desc)
|
||||
int err;
|
||||
|
||||
id = ida_simple_get(&module_id, 0, 0, GFP_KERNEL);
|
||||
if (id < 0)
|
||||
return id;
|
||||
|
||||
err = gb_audio_manager_module_create(&module, manager_kset,
|
||||
id, desc);
|
||||
if (err) {
|
||||
|
Loading…
Reference in New Issue
Block a user