[<prev] [next>] [day] [month] [year] [list]
Message-ID: <aTK9ZR0sMgqSACow@stanley.mountain>
Date: Fri, 5 Dec 2025 14:09:25 +0300
From: Dan Carpenter <dan.carpenter@...aro.org>
To: Harry Wentland <harry.wentland@....com>
Cc: Maarten Lankhorst <maarten.lankhorst@...ux.intel.com>,
Maxime Ripard <mripard@...nel.org>,
Thomas Zimmermann <tzimmermann@...e.de>,
David Airlie <airlied@...il.com>, Simona Vetter <simona@...ll.ch>,
Simon Ser <contact@...rsion.fr>, Alex Hung <alex.hung@....com>,
Sebastian Wick <sebastian.wick@...hat.com>,
Daniel Stone <daniels@...labora.com>,
dri-devel@...ts.freedesktop.org, linux-kernel@...r.kernel.org,
kernel-janitors@...r.kernel.org
Subject: [PATCH] drm/plane: Fix IS_ERR() vs NULL bug
drm_plane_create_color_pipeline_property()
The drm_property_create_enum() function returns NULL on error, it never
returns error pointers. Fix the error checking to match.
Fixes: 2afc3184f3b3 ("drm/plane: Add COLOR PIPELINE property")
Signed-off-by: Dan Carpenter <dan.carpenter@...aro.org>
---
drivers/gpu/drm/drm_plane.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/gpu/drm/drm_plane.c b/drivers/gpu/drm/drm_plane.c
index ce76c55913f7..e32c7ea8551c 100644
--- a/drivers/gpu/drm/drm_plane.c
+++ b/drivers/gpu/drm/drm_plane.c
@@ -1867,9 +1867,9 @@ int drm_plane_create_color_pipeline_property(struct drm_plane *plane,
prop = drm_property_create_enum(plane->dev, DRM_MODE_PROP_ATOMIC,
"COLOR_PIPELINE",
all_pipelines, len);
- if (IS_ERR(prop)) {
+ if (!prop) {
kfree(all_pipelines);
- return PTR_ERR(prop);
+ return -ENOMEM;
}
drm_object_attach_property(&plane->base, prop, 0);
--
2.51.0
Powered by blists - more mailing lists