Skip to content

Commit

Permalink
drm: xlnx: zynqmp_dpsub: Add missing check for dma_set_mask
Browse files Browse the repository at this point in the history
[ Upstream commit 1832fba ]

Add check for dma_set_mask() and return the error if it fails.

Fixes: d76271d ("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>
Signed-off-by: Sasha Levin <sashal@kernel.org>
  • Loading branch information
JiangJias authored and gregkh committed Sep 13, 2023
1 parent 9b372d2 commit 3b1f199
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion drivers/gpu/drm/xlnx/zynqmp_dpsub.c
Expand Up @@ -201,7 +201,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);
Expand Down

0 comments on commit 3b1f199

Please sign in to comment.