[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <YuKeBBuGtsmd7QdT@kili>
Date: Thu, 28 Jul 2022 17:32:36 +0300
From: Dan Carpenter <dan.carpenter@...cle.com>
To: Taras Chornyi <tchornyi@...vell.com>,
Oleksandr Mazur <oleksandr.mazur@...ision.eu>
Cc: "David S. Miller" <davem@...emloft.net>,
Eric Dumazet <edumazet@...gle.com>,
Jakub Kicinski <kuba@...nel.org>,
Paolo Abeni <pabeni@...hat.com>,
Yevhen Orlov <yevhen.orlov@...ision.eu>,
netdev@...r.kernel.org, kernel-janitors@...r.kernel.org
Subject: [PATCH net-next] net: marvell: prestera: uninitialized variable bug
The "ret" variable needs to be initialized at the start.
Fixes: 52323ef75414 ("net: marvell: prestera: add phylink support")
Signed-off-by: Dan Carpenter <dan.carpenter@...cle.com>
---
drivers/net/ethernet/marvell/prestera/prestera_main.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/net/ethernet/marvell/prestera/prestera_main.c b/drivers/net/ethernet/marvell/prestera/prestera_main.c
index c267ca1ccdba..4b64bda3f9c2 100644
--- a/drivers/net/ethernet/marvell/prestera/prestera_main.c
+++ b/drivers/net/ethernet/marvell/prestera/prestera_main.c
@@ -847,7 +847,7 @@ static void prestera_event_handlers_unregister(struct prestera_switch *sw)
static int prestera_switch_set_base_mac_addr(struct prestera_switch *sw)
{
struct device_node *base_mac_np;
- int ret;
+ int ret = 0;
if (sw->np) {
base_mac_np = of_parse_phandle(sw->np, "base-mac-provider", 0);
--
2.35.1
Powered by blists - more mailing lists