mirror of
https://github.com/torvalds/linux.git
synced 2026-11-06 21:58:01 +01:00
clk: bcm: iproc: 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: Florian Fainelli <florian.fainelli@broadcom.com> Message-ID: <28233748ddbdefe6a2eb18127d5cd5f72984ab62.1787239813.git.geert+renesas@glider.be> Signed-off-by: Brian Masney <bmasney@redhat.com>
This commit is contained in:
parent
16f9dc4296
commit
b546e02f36
|
|
@ -235,7 +235,7 @@ void __init iproc_armpll_setup(struct device_node *node)
|
|||
{
|
||||
int ret;
|
||||
struct iproc_arm_pll *pll;
|
||||
struct clk_init_data init;
|
||||
struct clk_init_data init = {};
|
||||
const char *parent_name;
|
||||
|
||||
pll = kzalloc_obj(*pll);
|
||||
|
|
|
|||
|
|
@ -206,7 +206,7 @@ void __init iproc_asiu_setup(struct device_node *node,
|
|||
goto err_iomap_gate;
|
||||
|
||||
for (i = 0; i < num_clks; i++) {
|
||||
struct clk_init_data init;
|
||||
struct clk_init_data init = {};
|
||||
const char *parent_name;
|
||||
struct iproc_asiu_clk *asiu_clk;
|
||||
const char *clk_name;
|
||||
|
|
|
|||
|
|
@ -722,7 +722,7 @@ void iproc_pll_clk_setup(struct device_node *node,
|
|||
int i, ret;
|
||||
struct iproc_pll *pll;
|
||||
struct iproc_clk *iclk;
|
||||
struct clk_init_data init;
|
||||
struct clk_init_data init = {};
|
||||
const char *parent_name;
|
||||
struct iproc_clk *iclk_array;
|
||||
struct clk_hw_onecell_data *clk_data;
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user