Commit 88fb6da3 authored by Kuninori Morimoto's avatar Kuninori Morimoto Committed by Mark Brown

ASoC: ti: 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-13-kuninori.morimoto.gx@renesas.comSigned-off-by: default avatarMark Brown <broonie@kernel.org>
parent 0624dafa
......@@ -2024,13 +2024,9 @@ static int davinci_mcasp_get_dma_type(struct davinci_mcasp *mcasp)
tmp = mcasp->dma_data[SNDRV_PCM_STREAM_PLAYBACK].filter_data;
chan = dma_request_chan(mcasp->dev, tmp);
if (IS_ERR(chan)) {
if (PTR_ERR(chan) != -EPROBE_DEFER)
dev_err(mcasp->dev,
"Can't verify DMA configuration (%ld)\n",
PTR_ERR(chan));
return PTR_ERR(chan);
}
if (IS_ERR(chan))
return dev_err_probe(mcasp->dev, PTR_ERR(chan),
"Can't verify DMA configuration\n");
if (WARN_ON(!chan->device || !chan->device->dev)) {
dma_release_channel(chan);
return -EINVAL;
......
......@@ -464,13 +464,9 @@ static int j721e_get_clocks(struct device *dev,
int ret;
clocks->target = devm_clk_get(dev, prefix);
if (IS_ERR(clocks->target)) {
ret = PTR_ERR(clocks->target);
if (ret != -EPROBE_DEFER)
dev_err(dev, "failed to acquire %s: %d\n",
prefix, ret);
return ret;
}
if (IS_ERR(clocks->target))
return dev_err_probe(dev, PTR_ERR(clocks->target),
"failed to acquire %s\n", prefix);
clk_name = kasprintf(GFP_KERNEL, "%s-48000", prefix);
if (clk_name) {
......
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