Skip to content

Commit

Permalink
net: marvell: prestera: uninitialized variable bug
Browse files Browse the repository at this point in the history
The "ret" variable needs to be initialized at the start.

Fixes: 52323ef ("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>
  • Loading branch information
Dan Carpenter authored and Jakub Kicinski committed Jul 30, 2022
1 parent 0f14a83 commit 7193084
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/net/ethernet/marvell/prestera/prestera_main.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit 7193084

Please sign in to comment.