Skip to content

Commit 6e0718f

Browse files
harshimogalapallibbrezillon
authored andcommitted
drm/panthor: Fix NULL vs IS_ERR() bug in panthor_probe()
The devm_drm_dev_alloc() function returns error pointers. Update the error handling to check for error pointers instead of NULL. Fixes: 4bdca11 ("drm/panthor: Add the driver frontend block") Signed-off-by: Harshit Mogalapalli <[email protected]> Reviewed-by: Boris Brezillon <[email protected]> Signed-off-by: Boris Brezillon <[email protected]> Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
1 parent 2b58907 commit 6e0718f

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

drivers/gpu/drm/panthor/panthor_drv.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1400,7 +1400,7 @@ static int panthor_probe(struct platform_device *pdev)
14001400

14011401
ptdev = devm_drm_dev_alloc(&pdev->dev, &panthor_drm_driver,
14021402
struct panthor_device, base);
1403-
if (!ptdev)
1403+
if (IS_ERR(ptdev))
14041404
return -ENOMEM;
14051405

14061406
platform_set_drvdata(pdev, ptdev);

0 commit comments

Comments
 (0)