Skip to content

Commit

Permalink
Revert "drm/tegra: sor: Do not leak runtime PM reference"
Browse files Browse the repository at this point in the history
This reverts commit 570b3e4.
  • Loading branch information
ranjan-dutta committed Jul 6, 2021
1 parent 425787e commit b303c72
Showing 1 changed file with 4 additions and 10 deletions.
14 changes: 4 additions & 10 deletions drivers/gpu/drm/tegra/sor.c
Original file line number Diff line number Diff line change
Expand Up @@ -3125,21 +3125,21 @@ static int tegra_sor_init(struct host1x_client *client)
if (err < 0) {
dev_err(sor->dev, "failed to acquire SOR reset: %d\n",
err);
goto rpm_put;
return err;
}

err = reset_control_assert(sor->rst);
if (err < 0) {
dev_err(sor->dev, "failed to assert SOR reset: %d\n",
err);
goto rpm_put;
return err;
}
}

err = clk_prepare_enable(sor->clk);
if (err < 0) {
dev_err(sor->dev, "failed to enable clock: %d\n", err);
goto rpm_put;
return err;
}

usleep_range(1000, 3000);
Expand All @@ -3150,7 +3150,7 @@ static int tegra_sor_init(struct host1x_client *client)
dev_err(sor->dev, "failed to deassert SOR reset: %d\n",
err);
clk_disable_unprepare(sor->clk);
goto rpm_put;
return err;
}

reset_control_release(sor->rst);
Expand All @@ -3171,12 +3171,6 @@ static int tegra_sor_init(struct host1x_client *client)
}

return 0;

rpm_put:
if (sor->rst)
pm_runtime_put(sor->dev);

return err;
}

static int tegra_sor_exit(struct host1x_client *client)
Expand Down

0 comments on commit b303c72

Please sign in to comment.