drm/panthor: return PTR_ERR() from devm_drm_dev_alloc()
Subsystems (3)
PATCH 1/1 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 4bdca1150792 ("drm/panthor: Add the driver frontend block")
Signed-off-by Osama Abdelkader <[email protected]>
--- drivers/gpu/drm/panthor/panthor_drv.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/gpu/drm/panthor/panthor_drv.c +1 -1
@@ -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);
Signature · 1 line
2.43.0
Quoted 6 lines · Osama Abdelkader
devm_drm_dev_alloc()returns anERR_PTR()on failure, butpanthor_probe()always converts that failure to-ENOMEM. Preserve the actual error code returned by the DRM core instead.Fixes 4bdca1150792 ("drm/panthor: Add the driver frontend block")Signed-off-by Osama Abdelkader <[email protected]>
Reviewed-by Steven Price <[email protected]>
I'll apply this to drm-misc-next.
Thanks,
Steve
Quoted 17 lines
--- drivers/gpu/drm/panthor/panthor_drv.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)drivers/gpu/drm/panthor/panthor_drv.c +1
-1@@ -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);