mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-09-29 13:53:33 +00:00
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>
This commit is contained in:
parent
c0b122a04e
commit
36b67efe0c
1 changed files with 3 additions and 1 deletions
|
@ -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);
|
||||
|
|
Loading…
Reference in a new issue