Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 3982f1df authored by YueHaibing's avatar YueHaibing Committed by Greg Kroah-Hartman
Browse files

staging: most: sound: Fix error path of audio_init



If most_register_configfs_subsys() fails, we should
call most_deregister_component() do cleanup.

Reported-by: default avatarHulk Robot <hulkci@huawei.com>
Fixes: 919c03ae ("staging: most: enable configfs support")
Signed-off-by: default avatarYueHaibing <yuehaibing@huawei.com>
Link: https://lore.kernel.org/r/20190827131346.12704-1-yuehaibing@huawei.com


Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent a1617c8c
Loading
Loading
Loading
Loading
+4 −1
Original line number Diff line number Diff line
@@ -802,8 +802,11 @@ static int __init audio_init(void)
	if (ret)
		pr_err("Failed to register %s\n", comp.name);
	ret = most_register_configfs_subsys(&comp);
	if (ret)
	if (ret) {
		pr_err("Failed to register %s configfs subsys\n", comp.name);
		most_deregister_component(&comp);
	}

	return ret;
}