]> git.baikalelectronics.ru Git - kernel.git/commitdiff
clk: versatile: remove redundant assignment to pointer clk
authorColin Ian King <colin.king@canonical.com>
Tue, 26 May 2020 22:41:16 +0000 (23:41 +0100)
committerStephen Boyd <sboyd@kernel.org>
Wed, 27 May 2020 06:40:41 +0000 (23:40 -0700)
The pointer clk is being initialized with a value that is never read
and is being updated with a new value later on. The initialization
is redundant and can be removed.

Addresses-Coverity: ("Unused value")
Signed-off-by: Colin Ian King <colin.king@canonical.com>
Link: https://lkml.kernel.org/r/20200526224116.63549-1-colin.king@canonical.com
Reviewed-by: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Stephen Boyd <sboyd@kernel.org>
drivers/clk/versatile/clk-versatile.c

index fd54d5c0251cc724f38d4f1de390a57d44d4dd1a..8ed7a179f65197288f5c442511862925ab008387 100644 (file)
@@ -56,7 +56,7 @@ static const struct clk_icst_desc versatile_auxosc_desc __initconst = {
 static void __init cm_osc_setup(struct device_node *np,
                                const struct clk_icst_desc *desc)
 {
-       struct clk *clk = ERR_PTR(-EINVAL);
+       struct clk *clk;
        const char *clk_name = np->name;
        const char *parent_name;