Skip to contentSkip to conversation

malidp: Fix NULL vs IS_ERR() checking

PATCH New Stefan Ghinea 1 participant 1 message Mar 7, 2023 Stable branch

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 malidp: Fix NULL vs IS_ERR() checking

From: Miaoqian Lin <[email protected]>

commit 15342f930ebebcfe36f2415049736a77d7d2e045 upstream

The get_sg_table() function does not return NULL.
It returns error pointers.

---
 drivers/gpu/drm/arm/malidp_planes.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/gpu/drm/arm/malidp_planes.c +1 -1
index 8c2ab3d653b7..f67c816050f2 100644
@@ -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;
Signature · 1 line
2.39.1