net: marvell: prestera: uninitialized variable bug

The "ret" variable needs to be initialized at the start.

Fixes: 52323ef754 ("net: marvell: prestera: add phylink support")
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Link: https://lore.kernel.org/r/YuKeBBuGtsmd7QdT@kili
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
This commit is contained in:
Dan Carpenter 2022-07-28 17:32:36 +03:00 committed by Jakub Kicinski
parent 0f14a8351a
commit 71930846b3
1 changed files with 1 additions and 1 deletions

View File

@ -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);