This is a note to let you know that I've just added the patch titled drm/meson: fix missing component unbind on bind errors to the 5.10-stable tree which can be found at: http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary The filename of the patch is: drm-meson-fix-missing-component-unbind-on-bind-error.patch and it can be found in the queue-5.10 subdirectory. If you, or anyone else, feels it should not be added to the stable tree, please let <stable@xxxxxxxxxxxxxxx> know about it. commit dc3ec0d7f8b1d5c5c654ba5cd19f35c4eb03afd0 Author: Johan Hovold <johan+linaro@xxxxxxxxxx> Date: Mon Mar 6 11:35:33 2023 +0100 drm/meson: fix missing component unbind on bind errors [ Upstream commit ba98413bf45edbf33672e2539e321b851b2cfbd1 ] Make sure to unbind all subcomponents when binding the aggregate device fails. Fixes: a41e82e6c457 ("drm/meson: Add support for components") Cc: stable@xxxxxxxxxxxxxxx # 4.12 Cc: Neil Armstrong <neil.armstrong@xxxxxxxxxx> Signed-off-by: Johan Hovold <johan+linaro@xxxxxxxxxx> Acked-by: Neil Armstrong <neil.armstrong@xxxxxxxxxx> Signed-off-by: Neil Armstrong <neil.armstrong@xxxxxxxxxx> Link: https://patchwork.freedesktop.org/patch/msgid/20230306103533.4915-1-johan+linaro@xxxxxxxxxx Signed-off-by: Sasha Levin <sashal@xxxxxxxxxx> diff --git a/drivers/gpu/drm/meson/meson_drv.c b/drivers/gpu/drm/meson/meson_drv.c index 090878bd74f6a..5c29ddf93eb3f 100644 --- a/drivers/gpu/drm/meson/meson_drv.c +++ b/drivers/gpu/drm/meson/meson_drv.c @@ -339,19 +339,19 @@ static int meson_drv_bind_master(struct device *dev, bool has_components) ret = meson_plane_create(priv); if (ret) - goto exit_afbcd; + goto unbind_all; ret = meson_overlay_create(priv); if (ret) - goto exit_afbcd; + goto unbind_all; ret = meson_crtc_create(priv); if (ret) - goto exit_afbcd; + goto unbind_all; ret = drm_irq_install(drm, priv->vsync_irq); if (ret) - goto exit_afbcd; + goto unbind_all; drm_mode_config_reset(drm); @@ -369,6 +369,9 @@ static int meson_drv_bind_master(struct device *dev, bool has_components) uninstall_irq: drm_irq_uninstall(drm); +unbind_all: + if (has_components) + component_unbind_all(drm->dev, drm); exit_afbcd: if (priv->afbcd.ops) priv->afbcd.ops->exit(priv);