未验证 提交 8250e6ca 编写于 作者: C Christophe JAILLET 提交者: Maxime Ripard

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: 4b1c924b ("drm/sun4i: hdmi: create a regmap for later use")
Reviewed-by: NChen-Yu Tsai <wens@csie.org>
Signed-off-by: NChristophe JAILLET <christophe.jaillet@wanadoo.fr>
Signed-off-by: NMaxime Ripard <maxime.ripard@bootlin.com>
Link: https://patchwork.freedesktop.org/patch/msgid/14c42391e1b562c7495bda6ad6fa1d24ec8dc052.1521413031.git.christophe.jaillet@wanadoo.fr
上级 9ca86149
...@@ -538,7 +538,8 @@ static int sun4i_hdmi_bind(struct device *dev, struct device *master, ...@@ -538,7 +538,8 @@ static int sun4i_hdmi_bind(struct device *dev, struct device *master,
&sun4i_hdmi_regmap_config); &sun4i_hdmi_regmap_config);
if (IS_ERR(hdmi->regmap)) { if (IS_ERR(hdmi->regmap)) {
dev_err(dev, "Couldn't create HDMI encoder regmap\n"); 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); ret = sun4i_tmds_create(hdmi);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册