Commit 328ec69e authored by Thierry Reding's avatar Thierry Reding

drm/tegra: Output cleanup functions cannot fail

The tegra_output_exit() and tegra_output_remove() functions cannot fail,
so make them return void.
Signed-off-by: default avatarThierry Reding <treding@nvidia.com>
parent ea130b24
...@@ -213,9 +213,9 @@ int tegra_dc_rgb_exit(struct tegra_dc *dc); ...@@ -213,9 +213,9 @@ int tegra_dc_rgb_exit(struct tegra_dc *dc);
/* from output.c */ /* from output.c */
int tegra_output_probe(struct tegra_output *output); int tegra_output_probe(struct tegra_output *output);
int tegra_output_remove(struct tegra_output *output); void tegra_output_remove(struct tegra_output *output);
int tegra_output_init(struct drm_device *drm, struct tegra_output *output); int tegra_output_init(struct drm_device *drm, struct tegra_output *output);
int tegra_output_exit(struct tegra_output *output); void tegra_output_exit(struct tegra_output *output);
int tegra_output_connector_get_modes(struct drm_connector *connector); int tegra_output_connector_get_modes(struct drm_connector *connector);
struct drm_encoder * struct drm_encoder *
......
...@@ -1577,11 +1577,7 @@ static int tegra_dsi_remove(struct platform_device *pdev) ...@@ -1577,11 +1577,7 @@ static int tegra_dsi_remove(struct platform_device *pdev)
return err; return err;
} }
err = tegra_output_remove(&dsi->output); tegra_output_remove(&dsi->output);
if (err < 0) {
dev_err(&pdev->dev, "failed to remove output: %d\n", err);
return err;
}
mipi_dsi_host_unregister(&dsi->host); mipi_dsi_host_unregister(&dsi->host);
tegra_mipi_free(dsi->mipi); tegra_mipi_free(dsi->mipi);
......
...@@ -1563,11 +1563,7 @@ static int tegra_hdmi_remove(struct platform_device *pdev) ...@@ -1563,11 +1563,7 @@ static int tegra_hdmi_remove(struct platform_device *pdev)
return err; return err;
} }
err = tegra_output_remove(&hdmi->output); tegra_output_remove(&hdmi->output);
if (err < 0) {
dev_err(&pdev->dev, "failed to remove output: %d\n", err);
return err;
}
clk_disable_unprepare(hdmi->clk_parent); clk_disable_unprepare(hdmi->clk_parent);
clk_disable_unprepare(hdmi->clk); clk_disable_unprepare(hdmi->clk);
......
...@@ -172,7 +172,7 @@ int tegra_output_probe(struct tegra_output *output) ...@@ -172,7 +172,7 @@ int tegra_output_probe(struct tegra_output *output)
return 0; return 0;
} }
int tegra_output_remove(struct tegra_output *output) void tegra_output_remove(struct tegra_output *output)
{ {
if (gpio_is_valid(output->hpd_gpio)) { if (gpio_is_valid(output->hpd_gpio)) {
free_irq(output->hpd_irq, output); free_irq(output->hpd_irq, output);
...@@ -181,8 +181,6 @@ int tegra_output_remove(struct tegra_output *output) ...@@ -181,8 +181,6 @@ int tegra_output_remove(struct tegra_output *output)
if (output->ddc) if (output->ddc)
put_device(&output->ddc->dev); put_device(&output->ddc->dev);
return 0;
} }
int tegra_output_init(struct drm_device *drm, struct tegra_output *output) int tegra_output_init(struct drm_device *drm, struct tegra_output *output)
...@@ -205,7 +203,7 @@ int tegra_output_init(struct drm_device *drm, struct tegra_output *output) ...@@ -205,7 +203,7 @@ int tegra_output_init(struct drm_device *drm, struct tegra_output *output)
return 0; return 0;
} }
int tegra_output_exit(struct tegra_output *output) void tegra_output_exit(struct tegra_output *output)
{ {
/* /*
* The connector is going away, so the interrupt must be disabled to * The connector is going away, so the interrupt must be disabled to
...@@ -216,6 +214,4 @@ int tegra_output_exit(struct tegra_output *output) ...@@ -216,6 +214,4 @@ int tegra_output_exit(struct tegra_output *output)
if (output->panel) if (output->panel)
drm_panel_detach(output->panel); drm_panel_detach(output->panel);
return 0;
} }
...@@ -287,15 +287,10 @@ int tegra_dc_rgb_probe(struct tegra_dc *dc) ...@@ -287,15 +287,10 @@ int tegra_dc_rgb_probe(struct tegra_dc *dc)
int tegra_dc_rgb_remove(struct tegra_dc *dc) int tegra_dc_rgb_remove(struct tegra_dc *dc)
{ {
int err;
if (!dc->rgb) if (!dc->rgb)
return 0; return 0;
err = tegra_output_remove(dc->rgb); tegra_output_remove(dc->rgb);
if (err < 0)
return err;
dc->rgb = NULL; dc->rgb = NULL;
return 0; return 0;
...@@ -342,8 +337,8 @@ int tegra_dc_rgb_init(struct drm_device *drm, struct tegra_dc *dc) ...@@ -342,8 +337,8 @@ int tegra_dc_rgb_init(struct drm_device *drm, struct tegra_dc *dc)
int tegra_dc_rgb_exit(struct tegra_dc *dc) int tegra_dc_rgb_exit(struct tegra_dc *dc)
{ {
if (!dc->rgb) if (dc->rgb)
return 0; tegra_output_exit(dc->rgb);
return tegra_output_exit(dc->rgb); return 0;
} }
...@@ -1396,6 +1396,8 @@ static int tegra_sor_exit(struct host1x_client *client) ...@@ -1396,6 +1396,8 @@ static int tegra_sor_exit(struct host1x_client *client)
struct tegra_sor *sor = host1x_client_to_sor(client); struct tegra_sor *sor = host1x_client_to_sor(client);
int err; int err;
tegra_output_exit(&sor->output);
if (sor->dpaux) { if (sor->dpaux) {
err = tegra_dpaux_detach(sor->dpaux); err = tegra_dpaux_detach(sor->dpaux);
if (err < 0) { if (err < 0) {
...@@ -1500,11 +1502,7 @@ static int tegra_sor_remove(struct platform_device *pdev) ...@@ -1500,11 +1502,7 @@ static int tegra_sor_remove(struct platform_device *pdev)
return err; return err;
} }
err = tegra_output_remove(&sor->output); tegra_output_remove(&sor->output);
if (err < 0) {
dev_err(&pdev->dev, "failed to remove output: %d\n", err);
return err;
}
return 0; return 0;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment