mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH] drm/plane: Fix IS_ERR() vs NULL bug drm_plane_create_color_pipeline_property()
@ 2025-12-05 11:09 Dan Carpenter
  2025-12-05 16:54 ` Simon Ser
  0 siblings, 1 reply; 3+ messages in thread
From: Dan Carpenter @ 2025-12-05 11:09 UTC (permalink / raw)
  To: Harry Wentland
  Cc: Maarten Lankhorst, Maxime Ripard, Thomas Zimmermann,
	David Airlie, Simona Vetter, Simon Ser, Alex Hung,
	Sebastian Wick, Daniel Stone, dri-devel, linux-kernel,
	kernel-janitors

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@linaro.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


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] drm/plane: Fix IS_ERR() vs NULL bug drm_plane_create_color_pipeline_property()
  2025-12-05 11:09 [PATCH] drm/plane: Fix IS_ERR() vs NULL bug drm_plane_create_color_pipeline_property() Dan Carpenter
@ 2025-12-05 16:54 ` Simon Ser
  2025-12-11 16:40   ` Simon Ser
  0 siblings, 1 reply; 3+ messages in thread
From: Simon Ser @ 2025-12-05 16:54 UTC (permalink / raw)
  To: Dan Carpenter
  Cc: Harry Wentland, Maarten Lankhorst, Maxime Ripard,
	Thomas Zimmermann, David Airlie, Simona Vetter, Alex Hung,
	Sebastian Wick, Daniel Stone, dri-devel, linux-kernel,
	kernel-janitors

Reviewed-by: Simon Ser <contact@emersion.fr>

Please ping me in a few days if I forget to push this.

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] drm/plane: Fix IS_ERR() vs NULL bug drm_plane_create_color_pipeline_property()
  2025-12-05 16:54 ` Simon Ser
@ 2025-12-11 16:40   ` Simon Ser
  0 siblings, 0 replies; 3+ messages in thread
From: Simon Ser @ 2025-12-11 16:40 UTC (permalink / raw)
  To: Dan Carpenter
  Cc: Harry Wentland, Maarten Lankhorst, Maxime Ripard,
	Thomas Zimmermann, David Airlie, Simona Vetter, Alex Hung,
	Sebastian Wick, Daniel Stone, dri-devel, linux-kernel,
	kernel-janitors

Pushed, thanks for the fix!

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2025-12-11 16:40 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2025-12-05 11:09 [PATCH] drm/plane: Fix IS_ERR() vs NULL bug drm_plane_create_color_pipeline_property() Dan Carpenter
2025-12-05 16:54 ` Simon Ser
2025-12-11 16:40   ` Simon Ser

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®