Message ID | YuKeBBuGtsmd7QdT@kili (mailing list archive) |
---|---|
State | Accepted |
Commit | 71930846b36f8e4e68267f8a3d47e33435c3657a |
Delegated to: | Netdev Maintainers |
Headers | show |
Series | [net-next] net: marvell: prestera: uninitialized variable bug | expand |
Hello: This patch was applied to netdev/net-next.git (master) by Jakub Kicinski <kuba@kernel.org>: On Thu, 28 Jul 2022 17:32:36 +0300 you wrote: > 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@oracle.com> > --- > drivers/net/ethernet/marvell/prestera/prestera_main.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) Here is the summary with links: - [net-next] net: marvell: prestera: uninitialized variable bug https://git.kernel.org/netdev/net-next/c/71930846b36f You are awesome, thank you!
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);
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@oracle.com> --- drivers/net/ethernet/marvell/prestera/prestera_main.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)