[PATCH v4 5/9] drm/meson: handle primary plane zpos allocation failure
Guillaume La Roque
glaroque at baylibre.com
Fri Dec 4 00:08:06 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 06b326bfd007..466be9b2d169 100644
--- a/drivers/gpu/drm/meson/meson_plane.c
+++ b/drivers/gpu/drm/meson/meson_plane.c
@@ -588,7 +588,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
More information about the linux-arm-kernel
mailing list