[PATCH net-next 3/3] net: phy: air_en8811h: Make sure clk_init_data is fully initialized
Geert Uytterhoeven <[email protected]>
| Newsgroups | org.kernel.vger.netdev,org.infradead.lists.linux-amlogic,org.infradead.lists.linux-arm-kernel,org.kernel.vger.linux-clk |
|---|---|
| Message-ID | <ebafac1803ee032ebd544a6ec5a1608c5630d81a.1787240118.git.geert+renesas@glider.be> |
The clk_init_data structure contains several mutually-exclusive members for different methods to specify the possible parents of a clock, prompting drivers to initialize only the members they need. However, not initializing all members may cause subtle issues, which are only exposed when CONFIG_INIT_STACK_ALL_PATTERN or CONFIG_INIT_STACK_NONE is enabled. Make sure all members are fully initialized, to avoid such bugs, and to prevent future breakage when converting drivers to a different method for specifying the parents. Signed-off-by: Geert Uytterhoeven <[email protected]> --- Compile-tested only. --- drivers/net/phy/air_en8811h.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/net/phy/air_en8811h.c b/drivers/net/phy/air_en8811h.c index edd49c193e476838..d1ab8744288bba0c 100644 --- a/drivers/net/phy/air_en8811h.c +++ b/drivers/net/phy/air_en8811h.c @@ -932,7 +932,7 @@ static const struct clk_ops an8811hb_clk_ops = { static int an8811hb_clk_provider_setup(struct device *dev, struct clk_hw *hw) { - struct clk_init_data init; + struct clk_init_data init = {}; int ret; if (!IS_ENABLED(CONFIG_COMMON_CLK)) @@ -1031,7 +1031,7 @@ static const struct clk_ops en8811h_clk_ops = { static int en8811h_clk_provider_setup(struct device *dev, struct clk_hw *hw) { - struct clk_init_data init; + struct clk_init_data init = {}; int ret; if (!IS_ENABLED(CONFIG_COMMON_CLK)) -- 2.43.0