drm/panthor: Don't return NULL from panthor_vm_get_heap_pool()
authorHarshit Mogalapalli <harshit.m.mogalapalli@oracle.com>
Tue, 2 Apr 2024 14:14:11 +0000 (07:14 -0700)
committerBoris Brezillon <boris.brezillon@collabora.com>
Wed, 3 Apr 2024 07:11:38 +0000 (09:11 +0200)
commit45c734fdd43db14444025910b4c59dd2b8be714a
tree8248c6fbeb7d9cd3e91696e31f4be93a0f44be64
parent6e0718f21feda0ed97f932cee39b676817e457f2
drm/panthor: Don't return NULL from panthor_vm_get_heap_pool()

The kernel doc says this function returns either a valid pointer
or an ERR_PTR(), but in practice this function can return NULL if
create=false. Fix the function to match the doc (return
ERR_PTR(-ENOENT) instead of NULL) and adjust all call-sites
accordingly.

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/20240402141412.1707949-1-harshit.m.mogalapalli@oracle.com
drivers/gpu/drm/panthor/panthor_drv.c
drivers/gpu/drm/panthor/panthor_mmu.c
drivers/gpu/drm/panthor/panthor_sched.c