mirror of
https://gitee.com/bianbu-linux/linux-6.6
synced 2025-04-24 14:07:52 -04:00
net: marvell: prestera: Add missing of_node_put() in prestera_switch_set_base_mac_addr
This node pointer is returned by of_find_compatible_node() with
refcount incremented. Calling of_node_put() to aovid the refcount leak.
Fixes: 501ef3066c
("net: marvell: prestera: Add driver for Prestera family ASIC devices")
Signed-off-by: Miaoqian Lin <linmq006@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
parent
2169b79258
commit
c9ffa3e2bc
1 changed files with 1 additions and 0 deletions
|
@ -554,6 +554,7 @@ static int prestera_switch_set_base_mac_addr(struct prestera_switch *sw)
|
|||
dev_info(prestera_dev(sw), "using random base mac address\n");
|
||||
}
|
||||
of_node_put(base_mac_np);
|
||||
of_node_put(np);
|
||||
|
||||
return prestera_hw_switch_mac_set(sw, sw->base_mac);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue