gpu: drm: Use dev_err_probe instead of dev_err
Subsystems (4)
PATCH 1/1 gpu: drm: Use dev_err_probe instead of dev_err
It is possible that dma_request_chan will return EPROBE_DEFER, which means that disp->dev is not ready yet. In this case, dev_err(disp->dev), there will be no output. This patch fixes the bug.
Signed-off-by Wang Ming <[email protected]>
--- drivers/gpu/drm/xlnx/zynqmp_disp.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/gpu/drm/xlnx/zynqmp_disp.c +2 -2
@@ -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; }
Signature · 6 lines
2.25.1 _______________________________________________ linux-arm-kernel mailing list [email protected] http://lists.infradead.org/mailman/listinfo/linux-arm-kernel