提交 7e67e986 编写于 作者: D Dmitry Osipenko 提交者: Thierry Reding

drm/tegra: hdmi: Unwind tegra_hdmi_init() errors

Add missing error unwinding to tegra_hdmi_init(), for consistency.
Signed-off-by: NDmitry Osipenko <digetx@gmail.com>
Signed-off-by: NThierry Reding <treding@nvidia.com>
上级 e1189faf
...@@ -1453,22 +1453,31 @@ static int tegra_hdmi_init(struct host1x_client *client) ...@@ -1453,22 +1453,31 @@ static int tegra_hdmi_init(struct host1x_client *client)
if (err < 0) { if (err < 0) {
dev_err(client->dev, "failed to enable HDMI regulator: %d\n", dev_err(client->dev, "failed to enable HDMI regulator: %d\n",
err); err);
return err; goto output_exit;
} }
err = regulator_enable(hdmi->pll); err = regulator_enable(hdmi->pll);
if (err < 0) { if (err < 0) {
dev_err(hdmi->dev, "failed to enable PLL regulator: %d\n", err); dev_err(hdmi->dev, "failed to enable PLL regulator: %d\n", err);
return err; goto disable_hdmi;
} }
err = regulator_enable(hdmi->vdd); err = regulator_enable(hdmi->vdd);
if (err < 0) { if (err < 0) {
dev_err(hdmi->dev, "failed to enable VDD regulator: %d\n", err); dev_err(hdmi->dev, "failed to enable VDD regulator: %d\n", err);
return err; goto disable_pll;
} }
return 0; return 0;
disable_pll:
regulator_disable(hdmi->pll);
disable_hdmi:
regulator_disable(hdmi->hdmi);
output_exit:
tegra_output_exit(&hdmi->output);
return err;
} }
static int tegra_hdmi_exit(struct host1x_client *client) static int tegra_hdmi_exit(struct host1x_client *client)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册