Commit 07b5b12d authored by Yu Kuai's avatar Yu Kuai Committed by Maxime Ripard

drm/sun4i: add missing put_device() call in sun8i_r40_tcon_tv_set_mux()

If sun8i_r40_tcon_tv_set_mux() succeed, sun8i_r40_tcon_tv_set_mux()
doesn't have a corresponding put_device(). Thus add put_device()
to fix the exception handling for this function implementation.

Fixes: 0305189a ("drm/sun4i: tcon: Add support for R40 TCON")
Signed-off-by: default avatarYu Kuai <yukuai3@huawei.com>
Signed-off-by: default avatarMaxime Ripard <maxime@cerno.tech>
Link: https://patchwork.freedesktop.org/patch/msgid/20200826010826.1785487-1-yukuai3@huawei.com
parent 460f26d3
...@@ -1433,14 +1433,18 @@ static int sun8i_r40_tcon_tv_set_mux(struct sun4i_tcon *tcon, ...@@ -1433,14 +1433,18 @@ static int sun8i_r40_tcon_tv_set_mux(struct sun4i_tcon *tcon,
if (IS_ENABLED(CONFIG_DRM_SUN8I_TCON_TOP) && if (IS_ENABLED(CONFIG_DRM_SUN8I_TCON_TOP) &&
encoder->encoder_type == DRM_MODE_ENCODER_TMDS) { encoder->encoder_type == DRM_MODE_ENCODER_TMDS) {
ret = sun8i_tcon_top_set_hdmi_src(&pdev->dev, id); ret = sun8i_tcon_top_set_hdmi_src(&pdev->dev, id);
if (ret) if (ret) {
put_device(&pdev->dev);
return ret; return ret;
}
} }
if (IS_ENABLED(CONFIG_DRM_SUN8I_TCON_TOP)) { if (IS_ENABLED(CONFIG_DRM_SUN8I_TCON_TOP)) {
ret = sun8i_tcon_top_de_config(&pdev->dev, tcon->id, id); ret = sun8i_tcon_top_de_config(&pdev->dev, tcon->id, id);
if (ret) if (ret) {
put_device(&pdev->dev);
return ret; return ret;
}
} }
return 0; return 0;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment