ASoC: soc-dapm: Switch to use dev_err_probe() helper

dev_err() can be replace with dev_err_probe() which will check if error
code is -EPROBE_DEFER.

Signed-off-by: Yang Yingliang <yangyingliang@huawei.com>
Link: https://lore.kernel.org/r/20220914133355.3779364-3-yangyingliang@huawei.com
Signed-off-by: Mark Brown <broonie@kernel.org>
This commit is contained in:
Yang Yingliang 2022-09-14 21:33:55 +08:00 committed by Mark Brown
parent 28a3fb26e8
commit a6b0be6512
No known key found for this signature in database
GPG Key ID: 24D68B725D5487D0

View File

@ -3764,9 +3764,8 @@ snd_soc_dapm_new_control_unlocked(struct snd_soc_dapm_context *dapm,
return w;
request_failed:
if (ret != -EPROBE_DEFER)
dev_err(dapm->dev, "ASoC: Failed to request %s: %d\n",
w->name, ret);
dev_err_probe(dapm->dev, ret, "ASoC: Failed to request %s\n",
w->name);
kfree_const(w->name);
name_failed:
kfree_const(w->sname);