Commit 15342f93 authored by Miaoqian Lin's avatar Miaoqian Lin Committed by Liviu Dudau

malidp: Fix NULL vs IS_ERR() checking

The get_sg_table() function does not return NULL.
It returns error pointers.
Signed-off-by: default avatarMiaoqian Lin <linmq006@gmail.com>
Signed-off-by: default avatarLiviu Dudau <liviu.dudau@arm.com>
Link: https://lore.kernel.org/dri-devel/20211213072115.18098-1-linmq006@gmail.com/
parent e08a99d0
......@@ -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;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment