@@ -486,8 +486,8 @@ struct clk_hw * __init
at91_clk_register_audio_pll_pad(struct regmap *regmap, const char *name,
const char *parent_name)
{
+ struct clk_init_data init = {};
struct clk_audio_pad *apad_ck;
- struct clk_init_data init;
int ret;
apad_ck = kzalloc_obj(*apad_ck);
@@ -517,8 +517,8 @@ struct clk_hw * __init
at91_clk_register_audio_pll_pmc(struct regmap *regmap, const char *name,
const char *parent_name)
{
+ struct clk_init_data init = {};
struct clk_audio_pmc *apmc_ck;
- struct clk_init_data init;
int ret;
apmc_ck = kzalloc_obj(*apmc_ck);
@@ -97,7 +97,7 @@ at91_clk_register_h32mx(struct regmap *regmap, const char *name,
const char *parent_name)
{
struct clk_sama5d4_h32mx *h32mxclk;
- struct clk_init_data init;
+ struct clk_init_data init = {};
int ret;
h32mxclk = kzalloc_obj(*h32mxclk);
@@ -298,8 +298,8 @@ at91_clk_register_main_rc_osc(struct regmap *regmap,
const char *name,
u32 frequency, u32 accuracy)
{
+ struct clk_init_data init = {};
struct clk_main_rc_osc *osc;
- struct clk_init_data init;
struct clk_hw *hw;
int ret;
@@ -318,7 +318,7 @@ at91_clk_register_pll(struct regmap *regmap, const char *name,
{
struct clk_pll *pll;
struct clk_hw *hw;
- struct clk_init_data init;
+ struct clk_init_data init = {};
int offset = PLL_REG(id);
unsigned int pllr;
int ret;
@@ -86,9 +86,9 @@ struct clk_hw * __init
at91_clk_register_plldiv(struct regmap *regmap, const char *name,
const char *parent_name)
{
+ struct clk_init_data init = {};
struct clk_plldiv *plldiv;
struct clk_hw *hw;
- struct clk_init_data init;
int ret;
plldiv = kzalloc_obj(*plldiv);
@@ -42,8 +42,8 @@ at91_clk_register_sam9260_slow(struct regmap *regmap,
int num_parents)
{
struct clk_sam9260_slow *slowck;
+ struct clk_init_data init = {};
struct clk_hw *hw;
- struct clk_init_data init;
int ret;
if (!name)
@@ -113,9 +113,9 @@ struct clk_hw * __init
at91sam9x5_clk_register_smd(struct regmap *regmap, const char *name,
const char **parent_names, u8 num_parents)
{
+ struct clk_init_data init = {};
struct at91sam9x5_clk_smd *smd;
struct clk_hw *hw;
- struct clk_init_data init;
int ret;
smd = kzalloc_obj(*smd);
@@ -224,9 +224,9 @@ _at91sam9x5_clk_register_usb(struct regmap *regmap, const char *name,
const char **parent_names, u8 num_parents,
u32 usbs_mask)
{
+ struct clk_init_data init = {};
struct at91sam9x5_clk_usb *usb;
struct clk_hw *hw;
- struct clk_init_data init;
int ret;
usb = kzalloc_obj(*usb);
@@ -275,9 +275,9 @@ struct clk_hw * __init
at91sam9n12_clk_register_usb(struct regmap *regmap, const char *name,
const char *parent_name)
{
+ struct clk_init_data init = {};
struct at91sam9x5_clk_usb *usb;
struct clk_hw *hw;
- struct clk_init_data init;
int ret;
usb = kzalloc_obj(*usb);
@@ -394,9 +394,9 @@ struct clk_hw * __init
at91rm9200_clk_register_usb(struct regmap *regmap, const char *name,
const char *parent_name, const u32 *divisors)
{
+ struct clk_init_data init = {};
struct at91rm9200_clk_usb *usb;
struct clk_hw *hw;
- struct clk_init_data init;
int ret;
usb = kzalloc_obj(*usb);
@@ -231,9 +231,9 @@ at91_clk_register_slow_rc_osc(void __iomem *sckcr,
unsigned long startup,
const struct clk_slow_bits *bits)
{
+ struct clk_init_data init = {};
struct clk_slow_rc_osc *osc;
struct clk_hw *hw;
- struct clk_init_data init;
int ret;
if (!sckcr || !name)
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 <geert+renesas@glider.be> --- Compile-tested only. --- drivers/clk/at91/clk-audio-pll.c | 4 ++-- drivers/clk/at91/clk-h32mx.c | 2 +- drivers/clk/at91/clk-main.c | 2 +- drivers/clk/at91/clk-pll.c | 2 +- drivers/clk/at91/clk-plldiv.c | 2 +- drivers/clk/at91/clk-slow.c | 2 +- drivers/clk/at91/clk-smd.c | 2 +- drivers/clk/at91/clk-usb.c | 6 +++--- drivers/clk/at91/sckc.c | 2 +- 9 files changed, 12 insertions(+), 12 deletions(-)