mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-09-27 12:57:53 +00:00
drm/meson: fix missing component unbind on bind errors
Make sure to unbind all subcomponents when binding the aggregate device
fails.
Fixes: a41e82e6c4
("drm/meson: Add support for components")
Cc: stable@vger.kernel.org # 4.12
Cc: Neil Armstrong <neil.armstrong@linaro.org>
Signed-off-by: Johan Hovold <johan+linaro@kernel.org>
Acked-by: Neil Armstrong <neil.armstrong@linaro.org>
Signed-off-by: Neil Armstrong <neil.armstrong@linaro.org>
Link: https://patchwork.freedesktop.org/patch/msgid/20230306103533.4915-1-johan+linaro@kernel.org
This commit is contained in:
parent
03aecb1acb
commit
ba98413bf4
1 changed files with 8 additions and 5 deletions
|
@ -325,23 +325,23 @@ static int meson_drv_bind_master(struct device *dev, bool has_components)
|
|||
|
||||
ret = meson_encoder_hdmi_init(priv);
|
||||
if (ret)
|
||||
goto exit_afbcd;
|
||||
goto unbind_all;
|
||||
|
||||
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 = request_irq(priv->vsync_irq, meson_irq, 0, drm->driver->name, drm);
|
||||
if (ret)
|
||||
goto exit_afbcd;
|
||||
goto unbind_all;
|
||||
|
||||
drm_mode_config_reset(drm);
|
||||
|
||||
|
@ -359,6 +359,9 @@ static int meson_drv_bind_master(struct device *dev, bool has_components)
|
|||
|
||||
uninstall_irq:
|
||||
free_irq(priv->vsync_irq, drm);
|
||||
unbind_all:
|
||||
if (has_components)
|
||||
component_unbind_all(drm->dev, drm);
|
||||
exit_afbcd:
|
||||
if (priv->afbcd.ops)
|
||||
priv->afbcd.ops->exit(priv);
|
||||
|
|
Loading…
Reference in a new issue