diff options
author | AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com> | 2024-09-19 14:02:08 +0200 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2024-10-13 17:12:54 +0200 |
commit | 1bca6ee0d077abbaafa4ab1167d6d31659c1edbb (patch) | |
tree | 9c120286092f097aedbb758f4f3f305d23b73222 | |
parent | cb2aeb2ec25884133110ffe5a67ff3cf7dee5ceb (diff) | |
download | lwn-1bca6ee0d077abbaafa4ab1167d6d31659c1edbb.tar.gz lwn-1bca6ee0d077abbaafa4ab1167d6d31659c1edbb.zip |
firmware: mtk-adsp-ipc: Switch to using dev_err_probe()
There is an error path that checks whether the return value is
-EPROBE_DEFER to decide whether to print the error message: that
is exactly open-coding dev_err_probe(), so, switch to that.
Signed-off-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>
Acked-by: Uwe Kleine-König <u.kleine-koenig@baylibre.com>
Link: https://lore.kernel.org/r/20240919120208.152987-1-angelogioacchino.delregno@collabora.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-rw-r--r-- | drivers/firmware/mtk-adsp-ipc.c | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/drivers/firmware/mtk-adsp-ipc.c b/drivers/firmware/mtk-adsp-ipc.c index a762302978de..fdb083f42ebf 100644 --- a/drivers/firmware/mtk-adsp-ipc.c +++ b/drivers/firmware/mtk-adsp-ipc.c @@ -95,10 +95,9 @@ static int mtk_adsp_ipc_probe(struct platform_device *pdev) adsp_chan->idx = i; adsp_chan->ch = mbox_request_channel_byname(cl, adsp_mbox_ch_names[i]); if (IS_ERR(adsp_chan->ch)) { - ret = PTR_ERR(adsp_chan->ch); - if (ret != -EPROBE_DEFER) - dev_err(dev, "Failed to request mbox chan %s ret %d\n", - adsp_mbox_ch_names[i], ret); + ret = dev_err_probe(dev, PTR_ERR(adsp_chan->ch), + "Failed to request mbox channel %s\n", + adsp_mbox_ch_names[i]); for (j = 0; j < i; j++) { adsp_chan = &adsp_ipc->chans[j]; |