clk: __clk_core_init() never takes NULL
authorStephen Boyd <sboyd@kernel.org>
Wed, 8 Dec 2021 04:15:34 +0000 (20:15 -0800)
committerStephen Boyd <sboyd@kernel.org>
Fri, 10 Dec 2021 01:15:47 +0000 (17:15 -0800)
The only caller of __clk_core_init() allocates the pointer and checks
the allocation for NULL so this check is impossible. Remove it.

Signed-off-by: Stephen Boyd <sboyd@kernel.org>
Link: https://lore.kernel.org/r/20211208041534.3928718-2-sboyd@kernel.org
drivers/clk/clk.c

index add86a4..d9414a7 100644 (file)
@@ -3414,9 +3414,6 @@ static int __clk_core_init(struct clk_core *core)
        unsigned long rate;
        int phase;
 
-       if (!core)
-               return -EINVAL;
-
        clk_prepare_lock();
 
        ret = clk_pm_runtime_get(core);