clk: ux500: 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: Ulf Hansson <ulfh@kernel.org>
Acked-by: Linus Walleij <linusw@kernel.org>
Message-ID: <bd84df92640a05a1a73a8bc775b2d50568a9d0ec.1787239813.git.geert+renesas@glider.be>
Signed-off-by: Brian Masney <bmasney@redhat.com>
This commit is contained in:
Geert Uytterhoeven 2026-08-21 10:53:49 +02:00 committed by Brian Masney
parent fcd74898a4
commit f3bdb1723b
3 changed files with 4 additions and 4 deletions

View File

@ -97,8 +97,8 @@ static struct clk *clk_reg_prcc(const char *name,
unsigned long flags,
const struct clk_ops *clk_prcc_ops)
{
struct clk_init_data clk_prcc_init = {};
struct clk_prcc *clk;
struct clk_init_data clk_prcc_init;
struct clk *clk_reg;
if (!name) {

View File

@ -200,8 +200,8 @@ static struct clk_hw *clk_reg_prcmu(const char *name,
unsigned long flags,
const struct clk_ops *clk_prcmu_ops)
{
struct clk_init_data clk_prcmu_init = {};
struct clk_prcmu *clk;
struct clk_init_data clk_prcmu_init;
int ret;
if (!name) {
@ -357,8 +357,8 @@ struct clk_hw *clk_reg_prcmu_clkout(const char *name,
u8 source, u8 divider)
{
struct clk_init_data clk_prcmu_clkout_init = {};
struct clk_prcmu_clkout *clk;
struct clk_init_data clk_prcmu_clkout_init;
u8 clkout_id;
int ret;

View File

@ -127,8 +127,8 @@ static struct clk *clk_reg_sysctrl(struct device *dev,
unsigned long flags,
const struct clk_ops *clk_sysctrl_ops)
{
struct clk_init_data clk_sysctrl_init = {};
struct clk_sysctrl *clk;
struct clk_init_data clk_sysctrl_init;
struct clk *clk_reg;
int i;