diff options
| author | Geert Uytterhoeven <geert+renesas@glider.be> | 2026-08-21 12:03:30 +0200 |
|---|---|---|
| committer | Andi Shyti <andi.shyti@linux.intel.com> | 2026-09-09 11:52:16 +0200 |
| commit | cba655492c205f3e65b5fe94ae5bb2a8ced3170b (patch) | |
| tree | 5f1558778ce65d2fbd579e0e44dfc99e2b9dc511 | |
| parent | 7159c712c182fc03c41cdfcab84fca88b3fc4900 (diff) | |
| download | linux-next-cba655492c205f3e65b5fe94ae5bb2a8ced3170b.tar.gz linux-next-cba655492c205f3e65b5fe94ae5bb2a8ced3170b.zip | |
i2c: bcm2835: 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>
Reviewed-by: Brian Masney <bmasney@redhat.com>
Signed-off-by: Andi Shyti <andi.shyti@kernel.org>
Link: https://patch.msgid.link/9f82f37e6d6c069cd44326bcd5e5a2a8069a13a9.1787239980.git.geert+renesas@glider.be
| -rw-r--r-- | drivers/i2c/busses/i2c-bcm2835.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/i2c/busses/i2c-bcm2835.c b/drivers/i2c/busses/i2c-bcm2835.c index 0d7e2654a534..b30f7e0e45f1 100644 --- a/drivers/i2c/busses/i2c-bcm2835.c +++ b/drivers/i2c/busses/i2c-bcm2835.c @@ -166,7 +166,7 @@ static struct clk *bcm2835_i2c_register_div(struct device *dev, struct clk *mclk, struct bcm2835_i2c_dev *i2c_dev) { - struct clk_init_data init; + struct clk_init_data init = {}; struct clk_bcm2835_i2c *priv; char name[32]; const char *mclk_name; |
