Commit 7b3f5b20 authored by Dinghao Liu's avatar Dinghao Liu Committed by Mark Brown

ASoC: codecs: Fix runtime PM imbalance in tas2552_probe

There is a rumtime PM imbalance between the error handling path
after devm_snd_soc_register_component() and all other error
handling paths. Add a PM runtime increment to balance refcount.
Signed-off-by: default avatarDinghao Liu <dinghao.liu@zju.edu.cn>
Link: https://lore.kernel.org/r/20210408064036.6691-1-dinghao.liu@zju.edu.cnSigned-off-by: default avatarMark Brown <broonie@kernel.org>
parent 44de8d80
...@@ -730,8 +730,10 @@ static int tas2552_probe(struct i2c_client *client, ...@@ -730,8 +730,10 @@ static int tas2552_probe(struct i2c_client *client,
ret = devm_snd_soc_register_component(&client->dev, ret = devm_snd_soc_register_component(&client->dev,
&soc_component_dev_tas2552, &soc_component_dev_tas2552,
tas2552_dai, ARRAY_SIZE(tas2552_dai)); tas2552_dai, ARRAY_SIZE(tas2552_dai));
if (ret < 0) if (ret < 0) {
dev_err(&client->dev, "Failed to register component: %d\n", ret); dev_err(&client->dev, "Failed to register component: %d\n", ret);
pm_runtime_get_noresume(&client->dev);
}
return ret; return ret;
} }
......
Markdown is supported
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