projects
/
linux-2.6-microblaze.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
589eb11
)
clk: davinci: da8xx-cfgchip: Initialize clk_init_data before use
author
Bastien Curutchet
<bastien.curutchet@bootlin.com>
Thu, 18 Jul 2024 11:55:34 +0000
(13:55 +0200)
committer
Stephen Boyd
<sboyd@kernel.org>
Thu, 18 Jul 2024 20:33:01 +0000
(13:33 -0700)
The flag attribute of the struct clk_init_data isn't initialized before
the devm_clk_hw_register() call. This can lead to unexpected behavior
during registration.
Initialize the entire clk_init_data to zero at declaration.
Cc: stable@vger.kernel.org
Fixes:
58e1e2d2cd89
("clk: davinci: cfgchip: Add TI DA8XX USB PHY clocks")
Signed-off-by: Bastien Curutchet <bastien.curutchet@bootlin.com>
Reviewed-by: David Lechner <david@lechnology.com>
Link:
https://lore.kernel.org/r/20240718115534.41513-1-bastien.curutchet@bootlin.com
Signed-off-by: Stephen Boyd <sboyd@kernel.org>
drivers/clk/davinci/da8xx-cfgchip.c
patch
|
blob
|
history
diff --git
a/drivers/clk/davinci/da8xx-cfgchip.c
b/drivers/clk/davinci/da8xx-cfgchip.c
index
ad2d0df
..
ec60ecb
100644
(file)
--- a/
drivers/clk/davinci/da8xx-cfgchip.c
+++ b/
drivers/clk/davinci/da8xx-cfgchip.c
@@
-508,7
+508,7
@@
da8xx_cfgchip_register_usb0_clk48(struct device *dev,
const char * const parent_names[] = { "usb_refclkin", "pll0_auxclk" };
struct clk *fck_clk;
struct da8xx_usb0_clk48 *usb0;
- struct clk_init_data init;
+ struct clk_init_data init
= {}
;
int ret;
fck_clk = devm_clk_get(dev, "fck");
@@
-583,7
+583,7
@@
da8xx_cfgchip_register_usb1_clk48(struct device *dev,
{
const char * const parent_names[] = { "usb0_clk48", "usb_refclkin" };
struct da8xx_usb1_clk48 *usb1;
- struct clk_init_data init;
+ struct clk_init_data init
= {}
;
int ret;
usb1 = devm_kzalloc(dev, sizeof(*usb1), GFP_KERNEL);