mirror of
https://github.com/torvalds/linux.git
synced 2024-11-11 14:42:24 +00:00
ASoC: generic: Use dev_err_probe() helper
Use the dev_err_probe() helper, instead of open-coding the same operation. Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Link: https://lore.kernel.org/r/20211214020843.2225831-15-kuninori.morimoto.gx@renesas.com Signed-off-by: Mark Brown <broonie@kernel.org>
This commit is contained in:
parent
2e6f557ca3
commit
7a0299e13b
@ -593,10 +593,7 @@ int audio_graph_parse_of(struct asoc_simple_priv *priv, struct device *dev)
|
||||
err:
|
||||
asoc_simple_clean_reference(card);
|
||||
|
||||
if (ret != -EPROBE_DEFER)
|
||||
dev_err(dev, "parse error %d\n", ret);
|
||||
|
||||
return ret;
|
||||
return dev_err_probe(dev, ret, "parse error\n");
|
||||
}
|
||||
EXPORT_SYMBOL_GPL(audio_graph_parse_of);
|
||||
|
||||
|
@ -1238,8 +1238,8 @@ int audio_graph2_parse_of(struct asoc_simple_priv *priv, struct device *dev,
|
||||
err:
|
||||
devm_kfree(dev, li);
|
||||
|
||||
if ((ret < 0) && (ret != -EPROBE_DEFER))
|
||||
dev_err(dev, "parse error %d\n", ret);
|
||||
if (ret < 0)
|
||||
dev_err_probe(dev, ret, "parse error\n");
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
@ -642,8 +642,7 @@ static int asoc_simple_probe(struct platform_device *pdev)
|
||||
|
||||
ret = simple_parse_of(priv, li);
|
||||
if (ret < 0) {
|
||||
if (ret != -EPROBE_DEFER)
|
||||
dev_err(dev, "parse error %d\n", ret);
|
||||
dev_err_probe(dev, ret, "parse error\n");
|
||||
goto err;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user