From: Tomeu Vizoso Date: Fri, 23 Jan 2015 11:03:28 +0000 (+0100) Subject: clk: Remove unneeded NULL checks X-Git-Tag: v4.0-rc1~16^2~13^2~9 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=c440525cb96780c369879e15083c29a479eb0598;p=platform%2Fkernel%2Flinux-exynos.git clk: Remove unneeded NULL checks As clk_unprepare_unused_subtree and clk_disable_unused_subtree are always called with a valid struct clk. Signed-off-by: Tomeu Vizoso Reviewed-by: Stephen Boyd Signed-off-by: Michael Turquette --- diff --git a/drivers/clk/clk.c b/drivers/clk/clk.c index aa8a9d2..05986e3 100644 --- a/drivers/clk/clk.c +++ b/drivers/clk/clk.c @@ -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); @@ -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); @@ -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;