]> git.proxmox.com Git - mirror_ubuntu-kernels.git/commitdiff
drm: xlnx: zynqmp_dpsub: Add missing check for dma_set_mask
authorJiasheng Jiang <jiasheng@iscas.ac.cn>
Wed, 7 Jun 2023 02:05:29 +0000 (10:05 +0800)
committerLaurent Pinchart <laurent.pinchart@ideasonboard.com>
Tue, 1 Aug 2023 22:36:53 +0000 (01:36 +0300)
Add check for dma_set_mask() and return the error if it fails.

Fixes: d76271d22694 ("drm: xlnx: DRM/KMS driver for Xilinx ZynqMP DisplayPort Subsystem")
Signed-off-by: Jiasheng Jiang <jiasheng@iscas.ac.cn>
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Reviewed-by: Tomi Valkeinen <tomi.valkeinen@ideasonboard.com>
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
drivers/gpu/drm/xlnx/zynqmp_dpsub.c

index 9d64a8d98372ebfdb7a48bf84e7c357c432dfd34..88eb33acd5f0dd4f98ed60343480f4258f65e798 100644 (file)
@@ -227,7 +227,9 @@ static int zynqmp_dpsub_probe(struct platform_device *pdev)
        dpsub->dev = &pdev->dev;
        platform_set_drvdata(pdev, dpsub);
 
-       dma_set_mask(dpsub->dev, DMA_BIT_MASK(ZYNQMP_DISP_MAX_DMA_BIT));
+       ret = dma_set_mask(dpsub->dev, DMA_BIT_MASK(ZYNQMP_DISP_MAX_DMA_BIT));
+       if (ret)
+               return ret;
 
        /* Try the reserved memory. Proceed if there's none. */
        of_reserved_mem_device_init(&pdev->dev);