Skip to content

Commit 470cb09

Browse files
Dan Carpenteremersion
authored andcommitted
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: 2afc318 ("drm/plane: Add COLOR PIPELINE property") Signed-off-by: Dan Carpenter <dan.carpenter@linaro.org> Signed-off-by: Simon Ser <contact@emersion.fr> Link: https://patch.msgid.link/aTK9ZR0sMgqSACow@stanley.mountain
1 parent 1b3d18d commit 470cb09

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

drivers/gpu/drm/drm_plane.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1867,9 +1867,9 @@ int drm_plane_create_color_pipeline_property(struct drm_plane *plane,
18671867
prop = drm_property_create_enum(plane->dev, DRM_MODE_PROP_ATOMIC,
18681868
"COLOR_PIPELINE",
18691869
all_pipelines, len);
1870-
if (IS_ERR(prop)) {
1870+
if (!prop) {
18711871
kfree(all_pipelines);
1872-
return PTR_ERR(prop);
1872+
return -ENOMEM;
18731873
}
18741874

18751875
drm_object_attach_property(&plane->base, prop, 0);

0 commit comments

Comments
 (0)