Commit 71930846 authored by Dan Carpenter's avatar Dan Carpenter Committed by Jakub Kicinski

net: marvell: prestera: uninitialized variable bug

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

Fixes: 52323ef7 ("net: marvell: prestera: add phylink support")
Signed-off-by: default avatarDan Carpenter <dan.carpenter@oracle.com>
Link: https://lore.kernel.org/r/YuKeBBuGtsmd7QdT@kiliSigned-off-by: default avatarJakub Kicinski <kuba@kernel.org>
parent 0f14a835
......@@ -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);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment