mirror of
https://github.com/torvalds/linux.git
synced 2026-11-06 21:58:01 +01:00
clk: st: 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> Message-ID: <e43a03b5f0b1a8151835d9823cbbcc03178b5e46.1787239813.git.geert+renesas@glider.be> Signed-off-by: Brian Masney <bmasney@redhat.com>
This commit is contained in:
parent
605757e177
commit
f444c65593
|
|
@ -209,7 +209,7 @@ static struct clk *clk_register_flexgen(const char *name,
|
|||
unsigned long flexgen_flags, bool mode) {
|
||||
struct flexgen *fgxbar;
|
||||
struct clk *clk;
|
||||
struct clk_init_data init;
|
||||
struct clk_init_data init = {};
|
||||
u32 xbar_shift;
|
||||
void __iomem *xbar_reg, *fdiv_reg;
|
||||
|
||||
|
|
|
|||
|
|
@ -444,9 +444,9 @@ static struct clk * __init st_clk_register_quadfs_pll(
|
|||
struct clkgen_quadfs_data *quadfs, void __iomem *reg,
|
||||
spinlock_t *lock)
|
||||
{
|
||||
struct clk_init_data init = {};
|
||||
struct st_clk_quadfs_pll *pll;
|
||||
struct clk *clk;
|
||||
struct clk_init_data init;
|
||||
|
||||
/*
|
||||
* Sanity check required pointers.
|
||||
|
|
@ -885,8 +885,8 @@ static struct clk * __init st_clk_register_quadfs_fsynth(
|
|||
unsigned long flags, spinlock_t *lock)
|
||||
{
|
||||
struct st_clk_quadfs_fsynth *fs;
|
||||
struct clk_init_data init = {};
|
||||
struct clk *clk;
|
||||
struct clk_init_data init;
|
||||
|
||||
/*
|
||||
* Sanity check required pointers, note that nsdiv3 is optional.
|
||||
|
|
|
|||
|
|
@ -652,9 +652,9 @@ static struct clk * __init clkgen_pll_register(const char *parent_name,
|
|||
void __iomem *reg, unsigned long pll_flags,
|
||||
const char *clk_name, spinlock_t *lock)
|
||||
{
|
||||
struct clk_init_data init = {};
|
||||
struct clkgen_pll *pll;
|
||||
struct clk *clk;
|
||||
struct clk_init_data init;
|
||||
|
||||
pll = kzalloc_obj(*pll);
|
||||
if (!pll)
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user