* [PATCH] clk: versatile: remove redundant assignment to pointer clk
@ 2020-05-26 22:41 Colin King
2020-05-27 5:49 ` Linus Walleij
2020-05-27 6:40 ` Stephen Boyd
0 siblings, 2 replies; 3+ messages in thread
From: Colin King @ 2020-05-26 22:41 UTC (permalink / raw)
To: Linus Walleij, Michael Turquette, Stephen Boyd, linux-arm-kernel,
linux-clk
Cc: kernel-janitors, linux-kernel
From: Colin Ian King <colin.king@canonical.com>
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>
---
drivers/clk/versatile/clk-versatile.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/clk/versatile/clk-versatile.c b/drivers/clk/versatile/clk-versatile.c
index fd54d5c0251c..8ed7a179f651 100644
--- a/drivers/clk/versatile/clk-versatile.c
+++ b/drivers/clk/versatile/clk-versatile.c
@@ -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;
--
2.25.1
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] clk: versatile: remove redundant assignment to pointer clk
2020-05-26 22:41 [PATCH] clk: versatile: remove redundant assignment to pointer clk Colin King
@ 2020-05-27 5:49 ` Linus Walleij
2020-05-27 6:40 ` Stephen Boyd
1 sibling, 0 replies; 3+ messages in thread
From: Linus Walleij @ 2020-05-27 5:49 UTC (permalink / raw)
To: Colin King
Cc: Michael Turquette, Stephen Boyd, Linux ARM, linux-clk,
kernel-janitors, linux-kernel
On Wed, May 27, 2020 at 12:41 AM Colin King <colin.king@canonical.com> wrote:
> From: Colin Ian King <colin.king@canonical.com>
>
> 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>
Reviewed-by: Linus Walleij <linus.walleij@linaro.org>
Yours,
Linus Walleij
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] clk: versatile: remove redundant assignment to pointer clk
2020-05-26 22:41 [PATCH] clk: versatile: remove redundant assignment to pointer clk Colin King
2020-05-27 5:49 ` Linus Walleij
@ 2020-05-27 6:40 ` Stephen Boyd
1 sibling, 0 replies; 3+ messages in thread
From: Stephen Boyd @ 2020-05-27 6:40 UTC (permalink / raw)
To: Colin King, Linus Walleij, Michael Turquette, linux-arm-kernel,
linux-clk
Cc: kernel-janitors, linux-kernel
Quoting Colin King (2020-05-26 15:41:16)
> From: Colin Ian King <colin.king@canonical.com>
>
> 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>
> ---
Applied to clk-next
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2020-05-27 6:40 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-05-26 22:41 [PATCH] clk: versatile: remove redundant assignment to pointer clk Colin King
2020-05-27 5:49 ` Linus Walleij
2020-05-27 6:40 ` Stephen Boyd
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).