lkml.org 
[lkml]   [2015]   [Jan]   [23]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH v13 1/6] clk: Remove unneeded NULL checks
Date
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>
---
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


\
 
 \ /
  Last update: 2015-01-23 12:21    [W:0.194 / U:0.040 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site