diff options
author | Christophe JAILLET <christophe.jaillet@wanadoo.fr> | 2018-03-18 23:48:09 +0100 |
---|---|---|
committer | Maxime Ripard <maxime.ripard@bootlin.com> | 2018-03-20 11:50:26 +0100 |
commit | 8250e6cadceddefb8ab32eb7a011b3201adebbb3 (patch) | |
tree | a45da2016864ddc05aafa264311d2ff7655437ed | |
parent | drm/sun4i: Fix an error handling path in 'sun4i_drv_bind()' (diff) | |
download | linux-8250e6cadceddefb8ab32eb7a011b3201adebbb3.tar.xz linux-8250e6cadceddefb8ab32eb7a011b3201adebbb3.zip |
drm/sun4i: hdmi: Fix an error handling path in 'sun4i_hdmi_bind()'
If we can not allocate the HDMI encoder regmap, we still need to free some
resources before returning.
Fixes: 4b1c924b1fc1 ("drm/sun4i: hdmi: create a regmap for later use")
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/14c42391e1b562c7495bda6ad6fa1d24ec8dc052.1521413031.git.christophe.jaillet@wanadoo.fr
-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 500b6fb3e028..d2839727bb0b 100644 --- a/drivers/gpu/drm/sun4i/sun4i_hdmi_enc.c +++ b/drivers/gpu/drm/sun4i/sun4i_hdmi_enc.c @@ -538,7 +538,8 @@ static int sun4i_hdmi_bind(struct device *dev, struct device *master, &sun4i_hdmi_regmap_config); if (IS_ERR(hdmi->regmap)) { dev_err(dev, "Couldn't create HDMI encoder regmap\n"); - return PTR_ERR(hdmi->regmap); + ret = PTR_ERR(hdmi->regmap); + goto err_disable_mod_clk; } ret = sun4i_tmds_create(hdmi); |