diff options
author | Christophe JAILLET <christophe.jaillet@wanadoo.fr> | 2018-03-18 23:48:10 +0100 |
---|---|---|
committer | Maxime Ripard <maxime.ripard@bootlin.com> | 2018-03-20 11:50:28 +0100 |
commit | 1bc659eb2369ab795a401ff82f7e3a87a46bc864 (patch) | |
tree | e9f134278ac348d46e7a4b80ea0cda7e3ca267f5 /drivers/gpu/drm/sun4i/sun4i_hdmi_enc.c | |
parent | 8250e6cadceddefb8ab32eb7a011b3201adebbb3 (diff) |
drm/sun4i: hdmi: Fix another error handling path in 'sun4i_hdmi_bind()'
If we can not get the HDMI DDC clock, we still need to free some
resources before returning.
Fixes: 939d749ad664 ("drm/sun4i: hdmi: Add support for controller hardware variants")
Reviewed-by: Chen-Yu Tsai <wens@csie.org>
Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
Signed-off-by: Maxime Ripard <maxime.ripard@bootlin.com>
Link: https://patchwork.freedesktop.org/patch/msgid/5e0084af4ad57e9eea3bca5bd8e2e95970cd6714.1521413031.git.christophe.jaillet@wanadoo.fr
Diffstat (limited to 'drivers/gpu/drm/sun4i/sun4i_hdmi_enc.c')
-rw-r--r-- | drivers/gpu/drm/sun4i/sun4i_hdmi_enc.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/gpu/drm/sun4i/sun4i_hdmi_enc.c b/drivers/gpu/drm/sun4i/sun4i_hdmi_enc.c index d2839727bb0b..fa4bcd092eaf 100644 --- a/drivers/gpu/drm/sun4i/sun4i_hdmi_enc.c +++ b/drivers/gpu/drm/sun4i/sun4i_hdmi_enc.c @@ -552,7 +552,8 @@ static int sun4i_hdmi_bind(struct device *dev, struct device *master, hdmi->ddc_parent_clk = devm_clk_get(dev, "ddc"); if (IS_ERR(hdmi->ddc_parent_clk)) { dev_err(dev, "Couldn't get the HDMI DDC clock\n"); - return PTR_ERR(hdmi->ddc_parent_clk); + ret = PTR_ERR(hdmi->ddc_parent_clk); + goto err_disable_mod_clk; } } else { hdmi->ddc_parent_clk = hdmi->tmds_clk; |