[PATCH v3 5/9] drm/meson: handle primary plane zpos allocation failure
From: Guillaume La Roque
Date: Thu Dec 03 2026 - 14:59:01 EST
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@xxxxxxxxxx>
Signed-off-by: Guillaume La Roque <glaroque@xxxxxxxxxxxx>
---
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 1698aaecee88..f52eefdd19cc 100644
--- a/drivers/gpu/drm/meson/meson_plane.c
+++ b/drivers/gpu/drm/meson/meson_plane.c
@@ -571,7 +571,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;
+ }
ret = drm_plane_create_blend_mode_property(plane, blend_modes);
if (ret)
--
2.34.1