kernel: bump 5.15 to 5.15.132
[openwrt/openwrt.git] / target / linux / generic / backport-5.15 / 791-v6.3-10-net-phy-motorcomm-uninitialized-variables-in.patch
1 From 9753613f7399601f9bae6ee81e9d4274246c98ab Mon Sep 17 00:00:00 2001
2 From: Dan Carpenter <error27@gmail.com>
3 Date: Wed, 15 Feb 2023 07:21:47 +0300
4 Subject: [PATCH] net: phy: motorcomm: uninitialized variables in
5 yt8531_link_change_notify()
6
7 These booleans are never set to false, but are just used without being
8 initialized.
9
10 Fixes: 4ac94f728a58 ("net: phy: Add driver for Motorcomm yt8531 gigabit ethernet phy")
11 Signed-off-by: Dan Carpenter <error27@gmail.com>
12 Reviewed-by: Frank Sae <Frank.Sae@motor-comm.com>
13 Link: https://lore.kernel.org/r/Y+xd2yJet2ImHLoQ@kili
14 Signed-off-by: Jakub Kicinski <kuba@kernel.org>
15 ---
16 drivers/net/phy/motorcomm.c | 6 +++---
17 1 file changed, 3 insertions(+), 3 deletions(-)
18
19 --- a/drivers/net/phy/motorcomm.c
20 +++ b/drivers/net/phy/motorcomm.c
21 @@ -1533,10 +1533,10 @@ static int yt8531_config_init(struct phy
22 static void yt8531_link_change_notify(struct phy_device *phydev)
23 {
24 struct device_node *node = phydev->mdio.dev.of_node;
25 + bool tx_clk_1000_inverted = false;
26 + bool tx_clk_100_inverted = false;
27 + bool tx_clk_10_inverted = false;
28 bool tx_clk_adj_enabled = false;
29 - bool tx_clk_1000_inverted;
30 - bool tx_clk_100_inverted;
31 - bool tx_clk_10_inverted;
32 u16 val = 0;
33 int ret;
34