public inbox for drm-ai-reviews@public-inbox.freedesktop.org
 help / color / mirror / Atom feed
* [PATCH] accel/ethosu propagate devm_drm_dev_alloc() error code
@ 2026-03-01  9:03 Alok Tiwari
  2026-03-03  4:00 ` Claude review: " Claude Code Review Bot
  2026-03-03  4:00 ` Claude Code Review Bot
  0 siblings, 2 replies; 3+ messages in thread
From: Alok Tiwari @ 2026-03-01  9:03 UTC (permalink / raw)
  To: robh, tomeu, ogabbay, tzimmermann, Frank.Li, dri-devel
  Cc: alok.a.tiwarilinux, alok.a.tiwari

devm_drm_dev_alloc() returns an ERR_PTR() on failure. Use PTR_ERR() rather
than always returning -ENOMEM so the probe path propagates the real error
code such as -ENOMEM, -EINVAL, and -ENODEV.

Fixes: 5a5e9c0228e6 ("accel: Add Arm Ethos-U NPU driver")
Signed-off-by: Alok Tiwari <alok.a.tiwari@oracle.com>
---
 drivers/accel/ethosu/ethosu_drv.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/drivers/accel/ethosu/ethosu_drv.c b/drivers/accel/ethosu/ethosu_drv.c
index 9992193d7338..196871ec2a06 100644
--- a/drivers/accel/ethosu/ethosu_drv.c
+++ b/drivers/accel/ethosu/ethosu_drv.c
@@ -337,7 +337,8 @@ static int ethosu_probe(struct platform_device *pdev)
 	ethosudev = devm_drm_dev_alloc(&pdev->dev, &ethosu_drm_driver,
 				       struct ethosu_device, base);
 	if (IS_ERR(ethosudev))
-		return -ENOMEM;
+		return PTR_ERR(ethosudev);
+
 	platform_set_drvdata(pdev, ethosudev);
 
 	dma_set_mask_and_coherent(&pdev->dev, DMA_BIT_MASK(40));
-- 
2.50.1


^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2026-03-03  4:00 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-03-01  9:03 [PATCH] accel/ethosu propagate devm_drm_dev_alloc() error code Alok Tiwari
2026-03-03  4:00 ` Claude review: " Claude Code Review Bot
2026-03-03  4:00 ` Claude Code Review Bot

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox