]> git.baikalelectronics.ru Git - kernel.git/commitdiff
malidp: Fix NULL vs IS_ERR() checking
authorMiaoqian Lin <linmq006@gmail.com>
Mon, 13 Dec 2021 07:21:15 +0000 (07:21 +0000)
committerLiviu Dudau <liviu.dudau@arm.com>
Thu, 28 Apr 2022 15:08:19 +0000 (16:08 +0100)
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/
drivers/gpu/drm/arm/malidp_planes.c

index 81d9f5004025ea5be73c0c9d2fee54864a72a64f..338cec4a3fff75e7ba1aba38bb49bdd5ce848d2b 100644 (file)
@@ -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;