From 027f942ce44131bc3a11aaae6dbb227f461845b6 Mon Sep 17 00:00:00 2001 From: Masahiro Yamada Date: Mon, 28 Dec 2015 19:22:58 +0900 Subject: [PATCH] clk: remove unnecessary !core->parents conditional This if-block has been here since the introduction of the common clock framework. Now no clock drivers are statically initialized. core->parent is always NULL at this point. Drop the redundant check and the confusing comment. Signed-off-by: Masahiro Yamada Reviewed-by: Vladimir Zapolskiy Signed-off-by: Stephen Boyd --- drivers/clk/clk.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/drivers/clk/clk.c b/drivers/clk/clk.c index e7701d6029b3..735828d55c00 100644 --- a/drivers/clk/clk.c +++ b/drivers/clk/clk.c @@ -2366,11 +2366,8 @@ static int __clk_core_init(struct clk_core *core) * in to clk_init during early boot; thus any access to core->parents[] * must always check for a NULL pointer and try to populate it if * necessary. - * - * If core->parents is not NULL we skip this entire block. This allows - * for clock drivers to statically initialize core->parents. */ - if (core->num_parents > 1 && !core->parents) { + if (core->num_parents > 1) { core->parents = kcalloc(core->num_parents, sizeof(struct clk *), GFP_KERNEL); /* -- 2.30.2