mirror of
https://github.com/torvalds/linux.git
synced 2026-11-07 06:17:02 +01:00
clk: davinci: Make sure clk_init_data is fully initialized
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> Reviewed-by: David Lechner <david@lechnology.com> Message-ID: <f3b503ff3fda049988c3e16071bbbfabf1b04629.1787239813.git.geert+renesas@glider.be> Signed-off-by: Brian Masney <bmasney@redhat.com>
This commit is contained in:
parent
8ed7cb12be
commit
9cb9148fdd
|
|
@ -91,7 +91,7 @@ da8xx_cfgchip_gate_clk_register(struct device *dev,
|
|||
struct clk *parent;
|
||||
const char *parent_name;
|
||||
struct da8xx_cfgchip_gate_clk *gate;
|
||||
struct clk_init_data init;
|
||||
struct clk_init_data init = {};
|
||||
int ret;
|
||||
|
||||
parent = devm_clk_get(dev, NULL);
|
||||
|
|
@ -241,7 +241,7 @@ da8xx_cfgchip_mux_clk_register(struct device *dev,
|
|||
{
|
||||
const char * const parent_names[] = { info->parent0, info->parent1 };
|
||||
struct da8xx_cfgchip_mux_clk *mux;
|
||||
struct clk_init_data init;
|
||||
struct clk_init_data init = {};
|
||||
int ret;
|
||||
|
||||
mux = devm_kzalloc(dev, sizeof(*mux), GFP_KERNEL);
|
||||
|
|
|
|||
|
|
@ -371,7 +371,7 @@ struct clk *davinci_pll_clk_register(struct device *dev,
|
|||
char pllout_name[MAX_NAME_SIZE];
|
||||
char postdiv_name[MAX_NAME_SIZE];
|
||||
char pllen_name[MAX_NAME_SIZE];
|
||||
struct clk_init_data init;
|
||||
struct clk_init_data init = {};
|
||||
struct davinci_pll_clk *pllout;
|
||||
struct davinci_pllen_clk *pllen;
|
||||
struct clk *oscin_clk = NULL;
|
||||
|
|
|
|||
|
|
@ -234,7 +234,7 @@ davinci_lpsc_clk_register(struct device *dev, const char *name,
|
|||
const char *parent_name, struct regmap *regmap,
|
||||
u32 md, u32 pd, u32 flags)
|
||||
{
|
||||
struct clk_init_data init;
|
||||
struct clk_init_data init = {};
|
||||
struct davinci_lpsc_clk *lpsc;
|
||||
int ret;
|
||||
bool is_on;
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user