drm/panthor: return PTR_ERR() from devm_drm_dev_alloc()

devm_drm_dev_alloc() returns an ERR_PTR() on failure, but panthor_probe()
always converts that failure to -ENOMEM. Preserve the actual error code
returned by the DRM core instead.

Fixes: 4bdca11507 ("drm/panthor: Add the driver frontend block")
Signed-off-by: Osama Abdelkader <osama.abdelkader@gmail.com>
Reviewed-by: Steven Price <steven.price@arm.com>
Signed-off-by: Steven Price <steven.price@arm.com>
Link: https://patch.msgid.link/20260716140337.10679-1-osama.abdelkader@gmail.com
This commit is contained in:
Osama Abdelkader
2026-07-16 16:03:36 +02:00
committed by Steven Price
parent c7b77a538e
commit abc1e559f8

View File

@@ -1824,7 +1824,7 @@ static int panthor_probe(struct platform_device *pdev)
ptdev = devm_drm_dev_alloc(&pdev->dev, &panthor_drm_driver,
struct panthor_device, base);
if (IS_ERR(ptdev))
return -ENOMEM;
return PTR_ERR(ptdev);
platform_set_drvdata(pdev, ptdev);