aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorYang Yingliang2022-09-14 21:33:55 +0800
committerMark Brown2022-09-14 15:06:02 +0100
commita6b0be65123e1dfbcce6653a82394f989d3372ff (patch)
tree8b1409e1767514cded2e47ee88b18dbec6da96de
parent28a3fb26e83e013c929a2e1185743ece7e8173ff (diff)
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>
-rw-r--r--sound/soc/soc-dapm.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/sound/soc/soc-dapm.c b/sound/soc/soc-dapm.c
index 47a7bf99472e..2d105bfee387 100644
--- a/sound/soc/soc-dapm.c
+++ b/sound/soc/soc-dapm.c
@@ -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);