Skip to content

Commit

Permalink
drm/tegra: dc: Check for valid parent clock
Browse files Browse the repository at this point in the history
Check that the desired parent clock is indeed a valid parent for the
display controller clock. This is purely cosmetic at this point since
the parent clocks are specified in DT and all the currently defined
parents are in fact valid parents of the display controller clock.

Signed-off-by: Thierry Reding <treding@nvidia.com>
  • Loading branch information
Thierry Reding committed Apr 2, 2015
1 parent 13a7a6a commit d298274
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions drivers/gpu/drm/tegra/dc.c
Original file line number Diff line number Diff line change
Expand Up @@ -1177,6 +1177,9 @@ int tegra_dc_state_setup_clock(struct tegra_dc *dc,
{
struct tegra_dc_state *state = to_dc_state(crtc_state);

if (!clk_has_parent(dc->clk, clk))
return -EINVAL;

state->clk = clk;
state->pclk = pclk;
state->div = div;
Expand Down

0 comments on commit d298274

Please sign in to comment.