drm: xlnx: zynqmp_dpsub: Use dev_err_probe instead of dev_err
authorWang Ming <machel@vivo.com>
Wed, 26 Jul 2023 11:57:56 +0000 (19:57 +0800)
committerLaurent Pinchart <laurent.pinchart@ideasonboard.com>
Tue, 1 Aug 2023 22:36:54 +0000 (01:36 +0300)
It is possible that dma_request_chan() returns EPROBE_DEFER, in which
case the driver defers probing without printing any message. Use
dev_err_probe() to record the probe deferral cause and ease debugging.

Signed-off-by: Wang Ming <machel@vivo.com>
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
drivers/gpu/drm/xlnx/zynqmp_disp.c

index 3b87eeb..68478bf 100644 (file)
@@ -1094,8 +1094,8 @@ static int zynqmp_disp_layer_request_dma(struct zynqmp_disp *disp,
                         "%s%u", dma_names[layer->id], i);
                dma->chan = dma_request_chan(disp->dev, dma_channel_name);
                if (IS_ERR(dma->chan)) {
-                       dev_err(disp->dev, "failed to request dma channel\n");
-                       ret = PTR_ERR(dma->chan);
+                       ret = dev_err_probe(disp->dev, PTR_ERR(dma->chan),
+                                           "failed to request dma channel\n");
                        dma->chan = NULL;
                        return ret;
                }