Skip to content

Commit

Permalink
clk: Remove unneeded NULL checks
Browse files Browse the repository at this point in the history
As clk_unprepare_unused_subtree and clk_disable_unused_subtree are
always called with a valid struct clk.

Signed-off-by: Tomeu Vizoso <tomeu.vizoso@collabora.com>
Reviewed-by: Stephen Boyd <sboyd@codeaurora.org>
Signed-off-by: Michael Turquette <mturquette@linaro.org>
  • Loading branch information
Tomeu Vizoso authored and Michael Turquette committed Jan 28, 2015
1 parent c88b2b6 commit c440525
Showing 1 changed file with 0 additions and 9 deletions.
9 changes: 0 additions & 9 deletions drivers/clk/clk.c
Original file line number Diff line number Diff line change
Expand Up @@ -428,9 +428,6 @@ static void clk_unprepare_unused_subtree(struct clk *clk)
{
struct clk *child;

if (!clk)
return;

hlist_for_each_entry(child, &clk->children, child_node)
clk_unprepare_unused_subtree(child);

Expand All @@ -454,9 +451,6 @@ static void clk_disable_unused_subtree(struct clk *clk)
struct clk *child;
unsigned long flags;

if (!clk)
goto out;

hlist_for_each_entry(child, &clk->children, child_node)
clk_disable_unused_subtree(child);

Expand All @@ -482,9 +476,6 @@ static void clk_disable_unused_subtree(struct clk *clk)

unlock_out:
clk_enable_unlock(flags);

out:
return;
}

static bool clk_ignore_unused;
Expand Down

0 comments on commit c440525

Please sign in to comment.