From: Miaoqian Lin Date: Mon, 13 Dec 2021 07:21:15 +0000 (+0000) Subject: malidp: Fix NULL vs IS_ERR() checking X-Git-Tag: baikal/mips/sdk6.1~5692^2~9^2~69 X-Git-Url: https://git.baikalelectronics.ru/sdk/?a=commitdiff_plain;h=2b2072df6a90355e7e0e18a9cc3e8bd8620404df;p=kernel.git 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 Signed-off-by: Liviu Dudau Link: https://lore.kernel.org/dri-devel/20211213072115.18098-1-linmq006@gmail.com/ --- diff --git a/drivers/gpu/drm/arm/malidp_planes.c b/drivers/gpu/drm/arm/malidp_planes.c index 81d9f5004025e..338cec4a3fff7 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;