[PATCH] drm/loongson: Fix return value check for kzalloc
Chen Ni
nichen at iscas.ac.cn
Tue Apr 15 01:54:14 UTC 2025
kzalloc doesn't return ERR_PTR, delete unneeded IS_ERR test.
Signed-off-by: Chen Ni <nichen at iscas.ac.cn>
---
drivers/gpu/drm/loongson/lsdc_gfxpll.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/gpu/drm/loongson/lsdc_gfxpll.c b/drivers/gpu/drm/loongson/lsdc_gfxpll.c
index 249c09d703ad..50b9f45db5b0 100644
--- a/drivers/gpu/drm/loongson/lsdc_gfxpll.c
+++ b/drivers/gpu/drm/loongson/lsdc_gfxpll.c
@@ -179,7 +179,7 @@ int loongson_gfxpll_create(struct drm_device *ddev,
int ret;
this = kzalloc(sizeof(*this), GFP_KERNEL);
- if (IS_ERR_OR_NULL(this))
+ if (!this)
return -ENOMEM;
this->ddev = ddev;
--
2.25.1
More information about the dri-devel
mailing list