You've already forked linux-rockchip
mirror of
https://github.com/armbian/linux-rockchip.git
synced 2026-01-06 11:08:10 -08:00
net: dsa: mt7530: add missing of_node_put() in mt7530_setup()
commita9e9b091a1upstream. Add of_node_put() if of_get_phy_mode() fails in mt7530_setup() Fixes:0c65b2b90d("net: of_get_phy_mode: Change API to solve int/unit warnings") Reported-by: Hulk Robot <hulkci@huawei.com> Signed-off-by: Yang Yingliang <yangyingliang@huawei.com> Link: https://lore.kernel.org/r/20220428095317.538829-1-yangyingliang@huawei.com Signed-off-by: Jakub Kicinski <kuba@kernel.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
committed by
Greg Kroah-Hartman
parent
1092656cc4
commit
2347e9c922
@@ -1663,6 +1663,7 @@ mt7530_setup(struct dsa_switch *ds)
|
||||
ret = of_get_phy_mode(mac_np, &interface);
|
||||
if (ret && ret != -ENODEV) {
|
||||
of_node_put(mac_np);
|
||||
of_node_put(phy_node);
|
||||
return ret;
|
||||
}
|
||||
id = of_mdio_parse_addr(ds->dev, phy_node);
|
||||
|
||||
Reference in New Issue
Block a user