summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMiaoqian Lin <linmq006@gmail.com>2021-12-13 07:21:15 +0000
committerLiviu Dudau <liviu.dudau@arm.com>2022-04-28 16:08:19 +0100
commit15342f930ebebcfe36f2415049736a77d7d2e045 (patch)
tree488fd70fd1895609bc5a7160cb28f0a673eb8632
parente08a99d005588f7f1d0647cdbc3368c98471fa6c (diff)
malidp: Fix NULL vs IS_ERR() checking
The get_sg_table() function does not return NULL. It returns error pointers. Signed-off-by: Miaoqian Lin <linmq006@gmail.com> Signed-off-by: Liviu Dudau <liviu.dudau@arm.com> Link: https://lore.kernel.org/dri-devel/20211213072115.18098-1-linmq006@gmail.com/
-rw-r--r--drivers/gpu/drm/arm/malidp_planes.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/gpu/drm/arm/malidp_planes.c b/drivers/gpu/drm/arm/malidp_planes.c
index 81d9f5004025..338cec4a3fff 100644
--- a/drivers/gpu/drm/arm/malidp_planes.c
+++ b/drivers/gpu/drm/arm/malidp_planes.c
@@ -344,7 +344,7 @@ static bool malidp_check_pages_threshold(struct malidp_plane_state *ms,
else
sgt = obj->funcs->get_sg_table(obj);
- if (!sgt)
+ if (IS_ERR(sgt))
return false;
sgl = sgt->sgl;