Commit 7a0299e1 authored by Kuninori Morimoto's avatar Kuninori Morimoto Committed by Mark Brown

ASoC: generic: Use dev_err_probe() helper

Use the dev_err_probe() helper, instead of open-coding the same
operation.
Signed-off-by: default avatarKuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Link: https://lore.kernel.org/r/20211214020843.2225831-15-kuninori.morimoto.gx@renesas.comSigned-off-by: default avatarMark Brown <broonie@kernel.org>
parent 2e6f557c
...@@ -593,10 +593,7 @@ int audio_graph_parse_of(struct asoc_simple_priv *priv, struct device *dev) ...@@ -593,10 +593,7 @@ int audio_graph_parse_of(struct asoc_simple_priv *priv, struct device *dev)
err: err:
asoc_simple_clean_reference(card); asoc_simple_clean_reference(card);
if (ret != -EPROBE_DEFER) return dev_err_probe(dev, ret, "parse error\n");
dev_err(dev, "parse error %d\n", ret);
return ret;
} }
EXPORT_SYMBOL_GPL(audio_graph_parse_of); EXPORT_SYMBOL_GPL(audio_graph_parse_of);
......
...@@ -1238,8 +1238,8 @@ int audio_graph2_parse_of(struct asoc_simple_priv *priv, struct device *dev, ...@@ -1238,8 +1238,8 @@ int audio_graph2_parse_of(struct asoc_simple_priv *priv, struct device *dev,
err: err:
devm_kfree(dev, li); devm_kfree(dev, li);
if ((ret < 0) && (ret != -EPROBE_DEFER)) if (ret < 0)
dev_err(dev, "parse error %d\n", ret); dev_err_probe(dev, ret, "parse error\n");
return ret; return ret;
} }
......
...@@ -642,8 +642,7 @@ static int asoc_simple_probe(struct platform_device *pdev) ...@@ -642,8 +642,7 @@ static int asoc_simple_probe(struct platform_device *pdev)
ret = simple_parse_of(priv, li); ret = simple_parse_of(priv, li);
if (ret < 0) { if (ret < 0) {
if (ret != -EPROBE_DEFER) dev_err_probe(dev, ret, "parse error\n");
dev_err(dev, "parse error %d\n", ret);
goto err; goto err;
} }
......
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