net: marvell: prestera: uninitialized variable bug
PATCH 1/1 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 <[email protected]>
--- drivers/net/ethernet/marvell/prestera/prestera_main.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/net/ethernet/marvell/prestera/prestera_main.c +1 -1
@@ -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 );
Signature · 1 line
2.35.1
This patch was applied to netdev/net-next.git (master) by Jakub Kicinski <[email protected]>:
Hello:
This patch was applied to netdev/net-next.git (master) by Jakub Kicinski <[email protected]>:
Quoted 7 lines · 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 <[email protected]>--- 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!
Signature · 2 lines
Deet-doot-dot, I am a bot. https://korg.docs.kernel.org/patchwork/pwbot.html