summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHarshit Mogalapalli <harshit.m.mogalapalli@oracle.com>2024-04-02 03:40:40 -0700
committerBoris Brezillon <boris.brezillon@collabora.com>2024-04-03 09:07:57 +0200
commit6e0718f21feda0ed97f932cee39b676817e457f2 (patch)
treee1f5a9c046271e446712ac092076da8401f6aca6
parent2b5890786014b926f845402ae80ebc71c4bd6d5c (diff)
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: 4bdca1150792 ("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
-rw-r--r--drivers/gpu/drm/panthor/panthor_drv.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/gpu/drm/panthor/panthor_drv.c b/drivers/gpu/drm/panthor/panthor_drv.c
index 730dd0c69cb8..5e3dc701d26d 100644
--- a/drivers/gpu/drm/panthor/panthor_drv.c
+++ b/drivers/gpu/drm/panthor/panthor_drv.c
@@ -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);