* [PATCH] drm/plane: Fix IS_ERR() vs NULL check in drm_plane_create_hotspot_properties()
@ 2025-12-03 17:35 Dan Carpenter
2025-12-04 6:58 ` Javier Martinez Canillas
0 siblings, 1 reply; 2+ messages in thread
From: Dan Carpenter @ 2025-12-03 17:35 UTC (permalink / raw)
To: Zack Rusin
Cc: Maarten Lankhorst, Maxime Ripard, Thomas Zimmermann, David Airlie,
Simona Vetter, Javier Martinez Canillas, dri-devel, linux-kernel,
kernel-janitors
The drm_property_create_signed_range() function doesn't return error
pointers it returns NULL on error. Fix the error checking to match.
Fixes: 8f7179a1027d ("drm/atomic: Add support for mouse hotspots")
Signed-off-by: Dan Carpenter <dan.carpenter@linaro.org>
---
drivers/gpu/drm/drm_plane.c | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/drivers/gpu/drm/drm_plane.c b/drivers/gpu/drm/drm_plane.c
index f72bfbdddf23..6ee752c90380 100644
--- a/drivers/gpu/drm/drm_plane.c
+++ b/drivers/gpu/drm/drm_plane.c
@@ -338,14 +338,14 @@ static int drm_plane_create_hotspot_properties(struct drm_plane *plane)
prop_x = drm_property_create_signed_range(plane->dev, 0, "HOTSPOT_X",
INT_MIN, INT_MAX);
- if (IS_ERR(prop_x))
- return PTR_ERR(prop_x);
+ if (!prop_x)
+ return -ENOMEM;
prop_y = drm_property_create_signed_range(plane->dev, 0, "HOTSPOT_Y",
INT_MIN, INT_MAX);
- if (IS_ERR(prop_y)) {
+ if (!prop_y) {
drm_property_destroy(plane->dev, prop_x);
- return PTR_ERR(prop_y);
+ return -ENOMEM;
}
drm_object_attach_property(&plane->base, prop_x, 0);
--
2.51.0
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] drm/plane: Fix IS_ERR() vs NULL check in drm_plane_create_hotspot_properties()
2025-12-03 17:35 [PATCH] drm/plane: Fix IS_ERR() vs NULL check in drm_plane_create_hotspot_properties() Dan Carpenter
@ 2025-12-04 6:58 ` Javier Martinez Canillas
0 siblings, 0 replies; 2+ messages in thread
From: Javier Martinez Canillas @ 2025-12-04 6:58 UTC (permalink / raw)
To: Dan Carpenter, Zack Rusin
Cc: Maarten Lankhorst, Maxime Ripard, Thomas Zimmermann, David Airlie,
Simona Vetter, dri-devel, linux-kernel, kernel-janitors
Dan Carpenter <dan.carpenter@linaro.org> writes:
Hello Dan,
> The drm_property_create_signed_range() function doesn't return error
> pointers it returns NULL on error. Fix the error checking to match.
>
> Fixes: 8f7179a1027d ("drm/atomic: Add support for mouse hotspots")
> Signed-off-by: Dan Carpenter <dan.carpenter@linaro.org>
> ---
Reviewed-by: Javier Martinez Canillas <javierm@redhat.com>
--
Best regards,
Javier Martinez Canillas
Core Platforms
Red Hat
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2025-12-04 6:59 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-12-03 17:35 [PATCH] drm/plane: Fix IS_ERR() vs NULL check in drm_plane_create_hotspot_properties() Dan Carpenter
2025-12-04 6:58 ` Javier Martinez Canillas
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox