Skip to content

Commit c440525

Browse files
tomeuvMichael Turquette
authored andcommitted
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 <tomeu.vizoso@collabora.com> Reviewed-by: Stephen Boyd <sboyd@codeaurora.org> Signed-off-by: Michael Turquette <mturquette@linaro.org>
1 parent c88b2b6 commit c440525

File tree

1 file changed

+0
-9
lines changed

1 file changed

+0
-9
lines changed

drivers/clk/clk.c

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -428,9 +428,6 @@ static void clk_unprepare_unused_subtree(struct clk *clk)
428428
{
429429
struct clk *child;
430430

431-
if (!clk)
432-
return;
433-
434431
hlist_for_each_entry(child, &clk->children, child_node)
435432
clk_unprepare_unused_subtree(child);
436433

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

457-
if (!clk)
458-
goto out;
459-
460454
hlist_for_each_entry(child, &clk->children, child_node)
461455
clk_disable_unused_subtree(child);
462456

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

483477
unlock_out:
484478
clk_enable_unlock(flags);
485-
486-
out:
487-
return;
488479
}
489480

490481
static bool clk_ignore_unused;

0 commit comments

Comments
 (0)