From 214a9a3d2d10f759830edef7f7a065576658debd Mon Sep 17 00:00:00 2001 From: Yunhee Seo Date: Mon, 8 Jul 2024 17:23:36 +0900 Subject: [PATCH] sound: Add proper error return code Initialization code should returns proper error code. However, there was no proper error return. By adding error return code, g_sound_theme_list can be initialized from sound_thememan_exit() properly. Change-Id: I1a27c0d89f162570d4a70ee3b15c72ba9e1a105f Signed-off-by: Yunhee Seo --- src/sound-theme-manager.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/sound-theme-manager.c b/src/sound-theme-manager.c index 01b2d5a..cc92d66 100644 --- a/src/sound-theme-manager.c +++ b/src/sound-theme-manager.c @@ -183,6 +183,9 @@ static void cleanup_sound_theme_element(gpointer data) int sound_thememan_init(void) { g_sound_theme_list = NULL; + if (g_sound_theme_list) + return -EAGAIN; + return 0; } -- 2.7.4