Commit 4009c224 authored by Thierry Reding's avatar Thierry Reding

drm/tegra: debugfs cleanup cannot fail

The debugfs cleanup code never fails, so no error is returned. Therefore
the functions can all return void instead.
Signed-off-by: default avatarThierry Reding <treding@nvidia.com>
parent 6fad8f66
...@@ -228,7 +228,7 @@ static int tegra_dsi_debugfs_init(struct tegra_dsi *dsi, ...@@ -228,7 +228,7 @@ static int tegra_dsi_debugfs_init(struct tegra_dsi *dsi,
return err; return err;
} }
static int tegra_dsi_debugfs_exit(struct tegra_dsi *dsi) static void tegra_dsi_debugfs_exit(struct tegra_dsi *dsi)
{ {
drm_debugfs_remove_files(dsi->debugfs_files, ARRAY_SIZE(debugfs_files), drm_debugfs_remove_files(dsi->debugfs_files, ARRAY_SIZE(debugfs_files),
dsi->minor); dsi->minor);
...@@ -239,8 +239,6 @@ static int tegra_dsi_debugfs_exit(struct tegra_dsi *dsi) ...@@ -239,8 +239,6 @@ static int tegra_dsi_debugfs_exit(struct tegra_dsi *dsi)
debugfs_remove(dsi->debugfs); debugfs_remove(dsi->debugfs);
dsi->debugfs = NULL; dsi->debugfs = NULL;
return 0;
} }
#define PKT_ID0(id) ((((id) & 0x3f) << 3) | (1 << 9)) #define PKT_ID0(id) ((((id) & 0x3f) << 3) | (1 << 9))
...@@ -1025,15 +1023,11 @@ static int tegra_dsi_init(struct host1x_client *client) ...@@ -1025,15 +1023,11 @@ static int tegra_dsi_init(struct host1x_client *client)
static int tegra_dsi_exit(struct host1x_client *client) static int tegra_dsi_exit(struct host1x_client *client)
{ {
struct tegra_dsi *dsi = host1x_client_to_dsi(client); struct tegra_dsi *dsi = host1x_client_to_dsi(client);
int err;
tegra_output_exit(&dsi->output); tegra_output_exit(&dsi->output);
if (IS_ENABLED(CONFIG_DEBUG_FS)) { if (IS_ENABLED(CONFIG_DEBUG_FS))
err = tegra_dsi_debugfs_exit(dsi); tegra_dsi_debugfs_exit(dsi);
if (err < 0)
dev_err(dsi->dev, "debugfs cleanup failed: %d\n", err);
}
reset_control_assert(dsi->rst); reset_control_assert(dsi->rst);
......
...@@ -1310,7 +1310,7 @@ static int tegra_hdmi_debugfs_init(struct tegra_hdmi *hdmi, ...@@ -1310,7 +1310,7 @@ static int tegra_hdmi_debugfs_init(struct tegra_hdmi *hdmi,
return err; return err;
} }
static int tegra_hdmi_debugfs_exit(struct tegra_hdmi *hdmi) static void tegra_hdmi_debugfs_exit(struct tegra_hdmi *hdmi)
{ {
drm_debugfs_remove_files(hdmi->debugfs_files, ARRAY_SIZE(debugfs_files), drm_debugfs_remove_files(hdmi->debugfs_files, ARRAY_SIZE(debugfs_files),
hdmi->minor); hdmi->minor);
...@@ -1321,8 +1321,6 @@ static int tegra_hdmi_debugfs_exit(struct tegra_hdmi *hdmi) ...@@ -1321,8 +1321,6 @@ static int tegra_hdmi_debugfs_exit(struct tegra_hdmi *hdmi)
debugfs_remove(hdmi->debugfs); debugfs_remove(hdmi->debugfs);
hdmi->debugfs = NULL; hdmi->debugfs = NULL;
return 0;
} }
static int tegra_hdmi_init(struct host1x_client *client) static int tegra_hdmi_init(struct host1x_client *client)
...@@ -1393,7 +1391,6 @@ static int tegra_hdmi_init(struct host1x_client *client) ...@@ -1393,7 +1391,6 @@ static int tegra_hdmi_init(struct host1x_client *client)
static int tegra_hdmi_exit(struct host1x_client *client) static int tegra_hdmi_exit(struct host1x_client *client)
{ {
struct tegra_hdmi *hdmi = host1x_client_to_hdmi(client); struct tegra_hdmi *hdmi = host1x_client_to_hdmi(client);
int err;
tegra_output_exit(&hdmi->output); tegra_output_exit(&hdmi->output);
...@@ -1404,12 +1401,8 @@ static int tegra_hdmi_exit(struct host1x_client *client) ...@@ -1404,12 +1401,8 @@ static int tegra_hdmi_exit(struct host1x_client *client)
regulator_disable(hdmi->pll); regulator_disable(hdmi->pll);
regulator_disable(hdmi->hdmi); regulator_disable(hdmi->hdmi);
if (IS_ENABLED(CONFIG_DEBUG_FS)) { if (IS_ENABLED(CONFIG_DEBUG_FS))
err = tegra_hdmi_debugfs_exit(hdmi); tegra_hdmi_debugfs_exit(hdmi);
if (err < 0)
dev_err(client->dev, "debugfs cleanup failed: %d\n",
err);
}
return 0; return 0;
} }
......
...@@ -710,12 +710,10 @@ static int tegra_sor_debugfs_init(struct tegra_sor *sor, ...@@ -710,12 +710,10 @@ static int tegra_sor_debugfs_init(struct tegra_sor *sor,
return err; return err;
} }
static int tegra_sor_debugfs_exit(struct tegra_sor *sor) static void tegra_sor_debugfs_exit(struct tegra_sor *sor)
{ {
debugfs_remove_recursive(sor->debugfs); debugfs_remove_recursive(sor->debugfs);
sor->debugfs = NULL; sor->debugfs = NULL;
return 0;
} }
static void tegra_sor_connector_dpms(struct drm_connector *connector, int mode) static void tegra_sor_connector_dpms(struct drm_connector *connector, int mode)
...@@ -1410,11 +1408,8 @@ static int tegra_sor_exit(struct host1x_client *client) ...@@ -1410,11 +1408,8 @@ static int tegra_sor_exit(struct host1x_client *client)
clk_disable_unprepare(sor->clk_dp); clk_disable_unprepare(sor->clk_dp);
clk_disable_unprepare(sor->clk); clk_disable_unprepare(sor->clk);
if (IS_ENABLED(CONFIG_DEBUG_FS)) { if (IS_ENABLED(CONFIG_DEBUG_FS))
err = tegra_sor_debugfs_exit(sor); tegra_sor_debugfs_exit(sor);
if (err < 0)
dev_err(sor->dev, "debugfs cleanup failed: %d\n", 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