[PATCH v2 5/9] drm/meson: handle primary plane zpos allocation failure

Guillaume La Roque glaroque at baylibre.com
Thu Dec 3 11:21:51 PST 2026


Return the allocation error and clean up the primary plane if its zpos
property cannot be created. Otherwise probe succeeds without the property
that describes the plane's fixed stacking order.

Fixes: fd311d880c76 ("drm/meson: Add zpos immutable property to planes")
Reviewed-by: Neil Armstrong <neil.armstrong at linaro.org>
Signed-off-by: Guillaume La Roque <glaroque at baylibre.com>
---
 drivers/gpu/drm/meson/meson_plane.c | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/meson/meson_plane.c b/drivers/gpu/drm/meson/meson_plane.c
index 3c73fd678fb2..1c65aedd3926 100644
--- a/drivers/gpu/drm/meson/meson_plane.c
+++ b/drivers/gpu/drm/meson/meson_plane.c
@@ -575,7 +575,11 @@ int meson_plane_create(struct meson_drm *priv)
 	drm_plane_helper_add(plane, &meson_plane_helper_funcs);
 
 	/* For now, OSD Primary plane is always on the front */
-	drm_plane_create_zpos_immutable_property(plane, 1);
+	ret = drm_plane_create_zpos_immutable_property(plane, 1);
+	if (ret) {
+		drm_plane_cleanup(plane);
+		return ret;
+	}
 
 	priv->primary_plane = plane;
 

-- 
2.34.1




More information about the linux-arm-kernel mailing list