mirror of
https://github.com/torvalds/linux.git
synced 2024-11-22 20:22:09 +00:00
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: 4bdca11507
("drm/panthor: Add the driver frontend block")
Signed-off-by: Harshit Mogalapalli <harshit.m.mogalapalli@oracle.com>
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20240402104041.1689951-1-harshit.m.mogalapalli@oracle.com
This commit is contained in:
parent
2b58907860
commit
6e0718f21f
@ -1400,7 +1400,7 @@ static int panthor_probe(struct platform_device *pdev)
|
||||
|
||||
ptdev = devm_drm_dev_alloc(&pdev->dev, &panthor_drm_driver,
|
||||
struct panthor_device, base);
|
||||
if (!ptdev)
|
||||
if (IS_ERR(ptdev))
|
||||
return -ENOMEM;
|
||||
|
||||
platform_set_drvdata(pdev, ptdev);
|
||||
|
Loading…
Reference in New Issue
Block a user