Skip to content

Commit

Permalink
drm/sun4i: hdmi: Fix an error handling path in 'sun4i_hdmi_bind()'
Browse files Browse the repository at this point in the history
If we can not allocate the HDMI encoder regmap, we still need to free some
resources before returning.

Fixes: 4b1c924 ("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
  • Loading branch information
Christophe JAILLET authored and Maxime Ripard committed Mar 20, 2018
1 parent 9ca8614 commit 8250e6c
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion drivers/gpu/drm/sun4i/sun4i_hdmi_enc.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit 8250e6c

Please sign in to comment.