The audio manager module is created in a context that permits sleeping. Its caller, gb_audio_manager_add(), already uses GFP_KERNEL through ida_alloc(), and module creation subsequently calls kobject_init_and_add().
GFP_ATOMIC is unnecessary in this context and restricts memory reclaim. Remove the explicit flag to use the default GFP_KERNEL allocation.
Signed-off-by: Torra Sowmya sowmyatorra@gmail.com --- drivers/staging/greybus/audio_manager_module.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/staging/greybus/audio_manager_module.c b/drivers/staging/greybus/audio_manager_module.c index dc90cc2d2308..8a9f7e7d1766 100644 --- a/drivers/staging/greybus/audio_manager_module.c +++ b/drivers/staging/greybus/audio_manager_module.c @@ -187,7 +187,7 @@ int gb_audio_manager_module_create(struct gb_audio_manager_module **module, int err; struct gb_audio_manager_module *m;
- m = kzalloc_obj(*m, GFP_ATOMIC); + m = kzalloc_obj(*m); if (!m) return -ENOMEM;