* [PATCH] udmabuf: Fix NULL vs IS_ERR() checking
@ 2021-12-13 7:21 Miaoqian Lin
0 siblings, 0 replies; only message in thread
From: Miaoqian Lin @ 2021-12-13 7:21 UTC (permalink / raw)
Cc: linmq006, Liviu Dudau, Brian Starkey, David Airlie,
Daniel Vetter, dri-devel, linux-kernel
The get_sg_table() function does not return NULL.
It returns error pointers.
Signed-off-by: Miaoqian Lin <linmq006@gmail.com>
---
drivers/gpu/drm/arm/malidp_planes.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/gpu/drm/arm/malidp_planes.c b/drivers/gpu/drm/arm/malidp_planes.c
index 0562bdaac00c..2ef8feae8c4e 100644
--- a/drivers/gpu/drm/arm/malidp_planes.c
+++ b/drivers/gpu/drm/arm/malidp_planes.c
@@ -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;
--
2.17.1
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2021-12-13 7:21 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-12-13 7:21 [PATCH] udmabuf: Fix NULL vs IS_ERR() checking Miaoqian Lin
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).