diff options
-rw-r--r-- | drivers/staging/greybus/audio_module.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/staging/greybus/audio_module.c b/drivers/staging/greybus/audio_module.c index 53e84f5..95d2dda 100644 --- a/drivers/staging/greybus/audio_module.c +++ b/drivers/staging/greybus/audio_module.c @@ -363,10 +363,12 @@ static void gb_audio_disconnect(struct gb_bundle *bundle) struct gbaudio_data_connection *dai, *_dai; + /* cleanup module related resources first */ + gbaudio_unregister_module(gbmodule); + /* inform uevent to above layers */ gb_audio_manager_remove(gbmodule->manager_id); - gbaudio_unregister_module(gbmodule); gbaudio_tplg_release(gbmodule); kfree(gbmodule->topology); gbmodule->topology = NULL; |