[PATCH v9 1/3] clk: Remove unneeded NULL checks

From: Tomeu Vizoso
Date: Mon Jan 19 2015 - 12:21:30 EST


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@xxxxxxxxxxxxx>
---
drivers/clk/clk.c | 9 ---------
1 file changed, 9 deletions(-)

diff --git a/drivers/clk/clk.c b/drivers/clk/clk.c
index f4963b7..97f3425 100644
--- a/drivers/clk/clk.c
+++ b/drivers/clk/clk.c
@@ -432,9 +432,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);

@@ -458,9 +455,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);

@@ -486,9 +480,6 @@ static void clk_disable_unused_subtree(struct clk *clk)

unlock_out:
clk_enable_unlock(flags);
-
-out:
- return;
}

static bool clk_ignore_unused;
--
1.9.3

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/