diff options
author | Dinghao Liu <dinghao.liu@zju.edu.cn> | 2021-04-08 14:40:34 +0800 |
---|---|---|
committer | Mark Brown <broonie@kernel.org> | 2021-04-08 15:08:50 +0100 |
commit | 7b3f5b207da5116add56c335c5fb92cee140dc63 (patch) | |
tree | 48d9cb0f21f7bea4b99d755b02da8fd6f1fc9188 /sound | |
parent | 44de8d80dba4e65f4fe7c17ea4be75e3cf9a902c (diff) | |
download | linux-next-7b3f5b207da5116add56c335c5fb92cee140dc63.tar.gz |
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>
Diffstat (limited to 'sound')
-rw-r--r-- | sound/soc/codecs/tas2552.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/sound/soc/codecs/tas2552.c b/sound/soc/codecs/tas2552.c index bd00c35116cd..700baa6314aa 100644 --- a/sound/soc/codecs/tas2552.c +++ b/sound/soc/codecs/tas2552.c @@ -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; } |