mirror of
https://github.com/torvalds/linux.git
synced 2026-11-07 06:17:02 +01:00
phy: rockchip: 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: Heiko Stuebner <heiko@sntech.de> Reviewed-by: Brian Masney <bmasney@redhat.com> Link: https://patch.msgid.link/adb5bd47343dd31661748d5de14cb28a2bae2d17.1787240165.git.geert+renesas@glider.be Signed-off-by: Vinod Koul <vkoul@kernel.org>
This commit is contained in:
parent
fdc340bfc7
commit
91967098fd
|
|
@ -1044,7 +1044,7 @@ static int inno_hdmi_phy_clk_register(struct inno_hdmi_phy *inno)
|
|||
{
|
||||
struct device *dev = inno->dev;
|
||||
struct device_node *np = dev->of_node;
|
||||
struct clk_init_data init;
|
||||
struct clk_init_data init = {};
|
||||
const char *parent_name;
|
||||
int ret;
|
||||
|
||||
|
|
|
|||
|
|
@ -400,7 +400,7 @@ static int
|
|||
rockchip_usb2phy_clk480m_register(struct rockchip_usb2phy *rphy)
|
||||
{
|
||||
struct device_node *node = rphy->dev->of_node;
|
||||
struct clk_init_data init;
|
||||
struct clk_init_data init = {};
|
||||
struct clk *refclk = NULL;
|
||||
const char *clk_name;
|
||||
int i;
|
||||
|
|
|
|||
|
|
@ -200,9 +200,9 @@ static int rockchip_usb_phy_init(struct rockchip_usb_phy_base *base,
|
|||
struct device_node *child)
|
||||
{
|
||||
struct rockchip_usb_phy *rk_phy;
|
||||
struct clk_init_data init = {};
|
||||
unsigned int reg_offset;
|
||||
const char *clk_name;
|
||||
struct clk_init_data init;
|
||||
int err, i;
|
||||
|
||||
rk_phy = devm_kzalloc(base->dev, sizeof(*rk_phy), GFP_KERNEL);
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user