mirror of
https://github.com/torvalds/linux.git
synced 2026-11-07 06:17:02 +01:00
clk: stm32: 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: <0b80535e9cfdc96d43169e5023e3a92a8f2252d6.1787239813.git.geert+renesas@glider.be> Signed-off-by: Brian Masney <bmasney@redhat.com>
This commit is contained in:
parent
bf79ec1952
commit
605757e177
|
|
@ -485,8 +485,8 @@ static struct clk *clk_register_apb_mul(struct device *dev, const char *name,
|
|||
const char *parent_name,
|
||||
unsigned long flags, u8 bit_idx)
|
||||
{
|
||||
struct clk_init_data init = {};
|
||||
struct clk_apb_mul *am;
|
||||
struct clk_init_data init;
|
||||
struct clk *clk;
|
||||
|
||||
am = kzalloc_obj(*am);
|
||||
|
|
@ -810,8 +810,8 @@ static struct clk_hw *clk_register_pll_div(const char *name,
|
|||
struct clk_hw *pll_hw, spinlock_t *lock)
|
||||
{
|
||||
struct stm32f4_pll_div *pll_div;
|
||||
struct clk_init_data init = {};
|
||||
struct clk_hw *hw;
|
||||
struct clk_init_data init;
|
||||
int ret;
|
||||
|
||||
/* allocate the divider */
|
||||
|
|
|
|||
|
|
@ -462,8 +462,8 @@ static struct clk_hw *clk_register_stm32_timer_ker(struct device *dev,
|
|||
u8 dppre_shift,
|
||||
spinlock_t *lock)
|
||||
{
|
||||
struct clk_init_data init = {};
|
||||
struct timer_ker *element;
|
||||
struct clk_init_data init;
|
||||
struct clk_hw *hw;
|
||||
int err;
|
||||
|
||||
|
|
|
|||
|
|
@ -902,8 +902,8 @@ static struct clk_hw *clk_register_pll(struct device *dev, const char *name,
|
|||
unsigned long flags,
|
||||
spinlock_t *lock)
|
||||
{
|
||||
struct clk_init_data init = {};
|
||||
struct stm32_pll_obj *element;
|
||||
struct clk_init_data init;
|
||||
struct clk_hw *hw;
|
||||
int err;
|
||||
|
||||
|
|
@ -1041,8 +1041,8 @@ static struct clk_hw *clk_register_cktim(struct device *dev, const char *name,
|
|||
void __iomem *timpre,
|
||||
spinlock_t *lock)
|
||||
{
|
||||
struct clk_init_data init = {};
|
||||
struct timer_cker *tim_ker;
|
||||
struct clk_init_data init;
|
||||
struct clk_hw *hw;
|
||||
int err;
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user