[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20250717-sti-rework-v1-1-46d516fb1ebb@gmail.com>
Date: Thu, 17 Jul 2025 21:15:32 +0200
From: Raphael Gallais-Pou <rgallaispou@...il.com>
To: Alain Volmat <alain.volmat@...s.st.com>,
Maarten Lankhorst <maarten.lankhorst@...ux.intel.com>,
Maxime Ripard <mripard@...nel.org>, Thomas Zimmermann <tzimmermann@...e.de>,
David Airlie <airlied@...il.com>, Simona Vetter <simona@...ll.ch>,
Patrice Chotard <patrice.chotard@...s.st.com>,
Rob Herring <robh@...nel.org>, Krzysztof Kozlowski <krzk+dt@...nel.org>,
Conor Dooley <conor+dt@...nel.org>
Cc: dri-devel@...ts.freedesktop.org, linux-kernel@...r.kernel.org,
linux-arm-kernel@...ts.infradead.org, devicetree@...r.kernel.org
Subject: [PATCH 1/4] drm/sti: check dma_set_coherent_mask return value
Return value for DMA allocation was not checked. Check it and return
error code in case of failing.
Signed-off-by: Raphael Gallais-Pou <rgallaispou@...il.com>
---
drivers/gpu/drm/sti/sti_drv.c | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/drivers/gpu/drm/sti/sti_drv.c b/drivers/gpu/drm/sti/sti_drv.c
index 5e9332df21df0db30f10b7a6f5a41cba85c4f7ae..42f21ab91957b38cb9aef012b6ee7f4ae1683edf 100644
--- a/drivers/gpu/drm/sti/sti_drv.c
+++ b/drivers/gpu/drm/sti/sti_drv.c
@@ -234,8 +234,11 @@ static int sti_platform_probe(struct platform_device *pdev)
struct device_node *node = dev->of_node;
struct device_node *child_np;
struct component_match *match = NULL;
+ int ret;
- dma_set_coherent_mask(dev, DMA_BIT_MASK(32));
+ ret = dma_set_coherent_mask(dev, DMA_BIT_MASK(32));
+ if (ret)
+ return ret;
devm_of_platform_populate(dev);
--
2.50.1
Powered by blists - more mailing lists