firmware: imx: scu: use dev_err_probe
authorAlexander Stein <alexander.stein@ew.tq-group.com>
Tue, 31 Jan 2023 09:53:40 +0000 (10:53 +0100)
committerShawn Guo <shawnguo@kernel.org>
Mon, 6 Mar 2023 02:10:24 +0000 (10:10 +0800)
This simplifies the code and silences -517 error messages. Also
the reason is listed in /sys/kernel/debug/devices_deferred.

Signed-off-by: Alexander Stein <alexander.stein@ew.tq-group.com>
Reviewed-by: Mukesh Ojha <quic_mojha@quicinc.com>
Signed-off-by: Shawn Guo <shawnguo@kernel.org>
drivers/firmware/imx/imx-scu.c

index dca79caccd01c15ff5761423e24a247a858abf7a..47db49911e7b89a05747da22f1858ccd3e32067a 100644 (file)
@@ -310,9 +310,8 @@ static int imx_scu_probe(struct platform_device *pdev)
                sc_chan->ch = mbox_request_channel_byname(cl, chan_name);
                if (IS_ERR(sc_chan->ch)) {
                        ret = PTR_ERR(sc_chan->ch);
-                       if (ret != -EPROBE_DEFER)
-                               dev_err(dev, "Failed to request mbox chan %s ret %d\n",
-                                       chan_name, ret);
+                       dev_err_probe(dev, ret, "Failed to request mbox chan %s\n",
+                                     chan_name);
                        kfree(chan_name);
                        return ret;
                }