Skip to content
Unverified Commit 1c348902 authored by Liliang Ye's avatar Liliang Ye Committed by Mark Brown
Browse files

ASoC: fsl_mqs: move of_node_put() to the correct location

of_node_put() should have been done directly after
mqs_priv->regmap = syscon_node_to_regmap(gpr_np);
otherwise it creates a reference leak on the success path.

To fix this, of_node_put() is moved to the correct location, and change
all the gotos to direct returns.

Fixes: a9d27367

 ("ASoC: fsl_mqs: Fix error handling in probe")
Signed-off-by: default avatarLiliang Ye <yll@hust.edu.cn>
Reviewed-by: default avatarDan Carpenter <error27@gmail.com>
Link: https://lore.kernel.org/r/20230403152647.17638-1-yll@hust.edu.cn
Signed-off-by: default avatarMark Brown <broonie@kernel.org>
parent 97c236e2
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment