diff options
author | Christian Gromm <christian.gromm@microchip.com> | 2020-06-23 18:07:32 +0300 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2020-06-25 16:41:17 +0300 |
commit | 36b67efe0cb3b33f6d58e1e86d5b2a02ff5ab387 (patch) | |
tree | 59d059f299a0a230606e62d9c116d0d2485c14ec /drivers/staging/most/sound/sound.c | |
parent | c0b122a04e1274b6714a3a1176a89fb0c98b82e4 (diff) | |
download | linux-36b67efe0cb3b33f6d58e1e86d5b2a02ff5ab387.tar.xz |
staging: most: sound: fix error path
Return error and exit the function in case registering the component
with the core is failing.
Signed-off-by: Christian Gromm <christian.gromm@microchip.com>
Link: https://lore.kernel.org/r/1592924855-25569-3-git-send-email-christian.gromm@microchip.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/staging/most/sound/sound.c')
-rw-r--r-- | drivers/staging/most/sound/sound.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/staging/most/sound/sound.c b/drivers/staging/most/sound/sound.c index e6396d11cbb0..80a8feba1662 100644 --- a/drivers/staging/most/sound/sound.c +++ b/drivers/staging/most/sound/sound.c @@ -742,8 +742,10 @@ static int __init audio_init(void) INIT_LIST_HEAD(&adpt_list); ret = most_register_component(&comp); - if (ret) + if (ret) { pr_err("Failed to register %s\n", comp.name); + return ret; + } ret = most_register_configfs_subsys(&comp); if (ret) { pr_err("Failed to register %s configfs subsys\n", comp.name); |