mirror of
https://github.com/torvalds/linux.git
synced 2026-11-06 21:58:01 +01:00
clk: spear: 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> Acked-by: Viresh Kumar <viresh.kumar@linaro.org> Message-ID: <d4500d249021013d52aa87407f875dc203a251df.1787239813.git.geert+renesas@glider.be> Signed-off-by: Brian Masney <bmasney@redhat.com>
This commit is contained in:
parent
40322814a6
commit
bf79ec1952
|
|
@ -138,8 +138,8 @@ struct clk *clk_register_aux(const char *aux_name, const char *gate_name,
|
|||
const struct aux_clk_masks *masks, struct aux_rate_tbl *rtbl,
|
||||
u8 rtbl_cnt, spinlock_t *lock, struct clk **gate_clk)
|
||||
{
|
||||
struct clk_init_data init = {};
|
||||
struct clk_aux *aux;
|
||||
struct clk_init_data init;
|
||||
struct clk *clk;
|
||||
|
||||
if (!aux_name || !parent_name || !reg || !rtbl || !rtbl_cnt) {
|
||||
|
|
|
|||
|
|
@ -125,7 +125,7 @@ struct clk *clk_register_frac(const char *name, const char *parent_name,
|
|||
unsigned long flags, void __iomem *reg,
|
||||
struct frac_rate_tbl *rtbl, u8 rtbl_cnt, spinlock_t *lock)
|
||||
{
|
||||
struct clk_init_data init;
|
||||
struct clk_init_data init = {};
|
||||
struct clk_frac *frac;
|
||||
struct clk *clk;
|
||||
|
||||
|
|
|
|||
|
|
@ -114,7 +114,7 @@ struct clk *clk_register_gpt(const char *name, const char *parent_name, unsigned
|
|||
long flags, void __iomem *reg, struct gpt_rate_tbl *rtbl, u8
|
||||
rtbl_cnt, spinlock_t *lock)
|
||||
{
|
||||
struct clk_init_data init;
|
||||
struct clk_init_data init = {};
|
||||
struct clk_gpt *gpt;
|
||||
struct clk *clk;
|
||||
|
||||
|
|
|
|||
|
|
@ -284,7 +284,7 @@ struct clk *clk_register_vco_pll(const char *vco_name, const char *pll_name,
|
|||
struct clk_vco *vco;
|
||||
struct clk_pll *pll;
|
||||
struct clk *vco_clk, *tpll_clk, *tvco_gate_clk;
|
||||
struct clk_init_data vco_init, pll_init;
|
||||
struct clk_init_data vco_init = {}, pll_init = {};
|
||||
const char **vco_parent_name;
|
||||
|
||||
if (!vco_name || !pll_name || !parent_name || !mode_reg || !cfg_reg ||
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user