Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

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>

authored by

AngeloGioacchino Del Regno and committed by
Greg Kroah-Hartman
1bca6ee0 cb2aeb2e

+3 -4
+3 -4
drivers/firmware/mtk-adsp-ipc.c
··· 95 95 adsp_chan->idx = i; 96 96 adsp_chan->ch = mbox_request_channel_byname(cl, adsp_mbox_ch_names[i]); 97 97 if (IS_ERR(adsp_chan->ch)) { 98 - ret = PTR_ERR(adsp_chan->ch); 99 - if (ret != -EPROBE_DEFER) 100 - dev_err(dev, "Failed to request mbox chan %s ret %d\n", 101 - adsp_mbox_ch_names[i], ret); 98 + ret = dev_err_probe(dev, PTR_ERR(adsp_chan->ch), 99 + "Failed to request mbox channel %s\n", 100 + adsp_mbox_ch_names[i]); 102 101 103 102 for (j = 0; j < i; j++) { 104 103 adsp_chan = &adsp_ipc->chans[j];