lkml.org 
[lkml]   [2015]   [Jan]   [19]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH v9 1/3] 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>
---
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-19 18:41    [W:0.120 / U:3.400 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site