From: Dan Carpenter <hidden> Date: 2021-11-18 11:15:50
The ->gem_create_object() function pointers are supposed to return NULL
on error. This function returns an error pointer but none of the
callers expect that so it will lead to an Oops. See drm_gem_vram_create()
for example of it checks for NULL but an error pointer would lead to a
crash.
Fixes: 4a791cb6d34f ("drm/ingenic: Add option to alloc cached GEM buffers")
Signed-off-by: Dan Carpenter <redacted>
---
drivers/gpu/drm/ingenic/ingenic-drm-drv.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
The ->gem_create_object() function pointers are supposed to return NULL
on error. This function returns an error pointer but none of the
callers expect that so it will lead to an Oops. See drm_gem_vram_create()
for example of it checks for NULL but an error pointer would lead to a
crash.
Fixes: 4a791cb6d34f ("drm/ingenic: Add option to alloc cached GEM buffers")
Signed-off-by: Dan Carpenter <redacted>
---
drivers/gpu/drm/ingenic/ingenic-drm-drv.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)