Skip to content

Commit 571cfad

Browse files
WeiyiLu-MediaTekbebarino
authored andcommitted
clk: mediatek: assign the initial value to clk_init_data of mtk_mux
When some new clock supports are introduced, e.g. [1] it might lead to an error although it should be NULL because clk_init_data is on the stack and it might have random values if using without initialization. Add the missing initial value to clk_init_data. [1] https://android-review.googlesource.com/c/kernel/common/+/1278046 Fixes: a3ae549 ("clk: mediatek: Add new clkmux register API") Signed-off-by: Weiyi Lu <[email protected]> Reviewed-by: Matthias Brugger <[email protected]> Cc: <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Stephen Boyd <[email protected]>
1 parent 1aca993 commit 571cfad

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

drivers/clk/mediatek/clk-mux.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -160,7 +160,7 @@ struct clk *mtk_clk_register_mux(const struct mtk_mux *mux,
160160
spinlock_t *lock)
161161
{
162162
struct mtk_clk_mux *clk_mux;
163-
struct clk_init_data init;
163+
struct clk_init_data init = {};
164164
struct clk *clk;
165165

166166
clk_mux = kzalloc(sizeof(*clk_mux), GFP_KERNEL);

0 commit comments

Comments
 (0)