diff options
author | Dmitry Osipenko <digetx@gmail.com> | 2021-12-04 17:37:17 +0300 |
---|---|---|
committer | Thierry Reding <treding@nvidia.com> | 2021-12-16 16:07:07 +0300 |
commit | 7e67e986194a3648bf471e16f89cb5f61377bb4f (patch) | |
tree | f24d047d39b69b17c9893969ef64703c09624c8c /drivers/gpu/drm/tegra | |
parent | e1189fafa5a1c49407a1bc01d850cc6dd52c058d (diff) | |
download | linux-7e67e986194a3648bf471e16f89cb5f61377bb4f.tar.xz |
drm/tegra: hdmi: Unwind tegra_hdmi_init() errors
Add missing error unwinding to tegra_hdmi_init(), for consistency.
Signed-off-by: Dmitry Osipenko <digetx@gmail.com>
Signed-off-by: Thierry Reding <treding@nvidia.com>
Diffstat (limited to 'drivers/gpu/drm/tegra')
-rw-r--r-- | drivers/gpu/drm/tegra/hdmi.c | 15 |
1 files changed, 12 insertions, 3 deletions
diff --git a/drivers/gpu/drm/tegra/hdmi.c b/drivers/gpu/drm/tegra/hdmi.c index e5d2a4026028..704271511d2b 100644 --- a/drivers/gpu/drm/tegra/hdmi.c +++ b/drivers/gpu/drm/tegra/hdmi.c @@ -1453,22 +1453,31 @@ static int tegra_hdmi_init(struct host1x_client *client) if (err < 0) { dev_err(client->dev, "failed to enable HDMI regulator: %d\n", err); - return err; + goto output_exit; } err = regulator_enable(hdmi->pll); if (err < 0) { dev_err(hdmi->dev, "failed to enable PLL regulator: %d\n", err); - return err; + goto disable_hdmi; } err = regulator_enable(hdmi->vdd); if (err < 0) { dev_err(hdmi->dev, "failed to enable VDD regulator: %d\n", err); - return err; + goto disable_pll; } 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) |