[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <20240429023833.1869154-1-nichen@iscas.ac.cn>
Date: Mon, 29 Apr 2024 10:38:33 +0800
From: Chen Ni <nichen@...as.ac.cn>
To: inki.dae@...sung.com,
sw0312.kim@...sung.com,
kyungmin.park@...sung.com,
airlied@...il.com,
daniel@...ll.ch,
krzk@...nel.org,
alim.akhtar@...sung.com,
m.szyprowski@...sung.com
Cc: dri-devel@...ts.freedesktop.org,
linux-arm-kernel@...ts.infradead.org,
linux-samsung-soc@...r.kernel.org,
linux-kernel@...r.kernel.org,
Chen Ni <nichen@...as.ac.cn>
Subject: [PATCH] drm/exynos: Add check for dma_set_max_seg_size
Add check for the return value of dma_set_max_seg_size() and return
the error if it fails in order to catch the error.
Fixes: ddfd4ab6bb08 ("drm/exynos: Fix dma_parms allocation")
Signed-off-by: Chen Ni <nichen@...as.ac.cn>
---
drivers/gpu/drm/exynos/exynos_drm_dma.c | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/drivers/gpu/drm/exynos/exynos_drm_dma.c b/drivers/gpu/drm/exynos/exynos_drm_dma.c
index e2c7373f20c6..0f942186f3ff 100644
--- a/drivers/gpu/drm/exynos/exynos_drm_dma.c
+++ b/drivers/gpu/drm/exynos/exynos_drm_dma.c
@@ -51,7 +51,10 @@ static int drm_iommu_attach_device(struct drm_device *drm_dev,
return -EINVAL;
}
- dma_set_max_seg_size(subdrv_dev, DMA_BIT_MASK(32));
+ ret = dma_set_max_seg_size(subdrv_dev, DMA_BIT_MASK(32));
+ if (ret)
+ return ret;
+
if (IS_ENABLED(CONFIG_ARM_DMA_USE_IOMMU)) {
/*
* Keep the original DMA mapping of the sub-device and
--
2.25.1
Powered by blists - more mailing lists