Thread (4 messages) 4 messages, 2 authors, 2020-05-26

Re: [PATCH v1] clk: mediatek: assign the initial value to clk_init_data of mtk_mux

From: Matthias Brugger <matthias.bgg@gmail.com>
Date: 2020-05-25 09:08:35
Also in: linux-clk, linux-mediatek, lkml, stable


On 25/05/2020 08:41, Weiyi Lu wrote:
It'd be dangerous when struct clk_core have new memebers.
Add the missing initial value to clk_init_data.
Sorry I don't really understand this commit message, can please explain.
In any case if this is a problem, then we probably we should fix it for all drivers.
Apart from drivers/clk/mediatek/clk-cpumux.c

It's a widely used pattern:
$ git grep "struct clk_init_data init;"| wc -l
235

Regards,
Matthias
quoted hunk ↗ jump to hunk
Fixes: a3ae549917f1 ("clk: mediatek: Add new clkmux register API")
Cc: <redacted>
Signed-off-by: Weiyi Lu <redacted>
---
 drivers/clk/mediatek/clk-mux.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/clk/mediatek/clk-mux.c b/drivers/clk/mediatek/clk-mux.c
index 76f9cd0..14e127e 100644
--- a/drivers/clk/mediatek/clk-mux.c
+++ b/drivers/clk/mediatek/clk-mux.c
@@ -160,7 +160,7 @@ struct clk *mtk_clk_register_mux(const struct mtk_mux *mux,
 				 spinlock_t *lock)
 {
 	struct mtk_clk_mux *clk_mux;
-	struct clk_init_data init;
+	struct clk_init_data init = {};
 	struct clk *clk;
 
 	clk_mux = kzalloc(sizeof(*clk_mux), GFP_KERNEL);
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help