mirror of
https://mirrors.bfsu.edu.cn/git/linux.git
synced 2024-11-16 00:34:20 +08:00
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: Dinghao Liu <dinghao.liu@zju.edu.cn> Link: https://lore.kernel.org/r/20210408064036.6691-1-dinghao.liu@zju.edu.cn Signed-off-by: Mark Brown <broonie@kernel.org>
This commit is contained in:
parent
44de8d80db
commit
7b3f5b207d
@ -730,8 +730,10 @@ static int tas2552_probe(struct i2c_client *client,
|
||||
ret = devm_snd_soc_register_component(&client->dev,
|
||||
&soc_component_dev_tas2552,
|
||||
tas2552_dai, ARRAY_SIZE(tas2552_dai));
|
||||
if (ret < 0)
|
||||
if (ret < 0) {
|
||||
dev_err(&client->dev, "Failed to register component: %d\n", ret);
|
||||
pm_runtime_get_noresume(&client->dev);
|
||||
}
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user