Skip to content

Commit

Permalink
malidp: Fix NULL vs IS_ERR() checking
Browse files Browse the repository at this point in the history
commit 15342f9 upstream.

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/
Signed-off-by: Stefan Ghinea <stefan.ghinea@windriver.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
  • Loading branch information
Miaoqian Lin authored and Greg Kroah-Hartman committed Mar 11, 2023
1 parent 545d72b commit 1c7988d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/gpu/drm/arm/malidp_planes.c
Original file line number Diff line number Diff line change
Expand Up @@ -348,7 +348,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;
Expand Down

0 comments on commit 1c7988d

Please sign in to comment.