mirror of
https://github.com/edk2-porting/linux-next.git
synced 2025-01-16 17:43:56 +08:00
net: fec: free/restore resource in related probe error pathes
Fixes in probe error path: - Restore dev_id before failed_ioremap path. Fixes: ("net: fec: restore dev_id in the cases of probe error") - Call of_node_put(phy_node) before failed_phy path. Fixes: ("net: fec: Support phys probed from devicetree and fixed-link") Signed-off-by: Fugang Duan <fugang.duan@nxp.com> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
parent
f737be8d61
commit
d1616f07e8
@ -3556,11 +3556,11 @@ failed_clk_ipg:
|
||||
failed_clk:
|
||||
if (of_phy_is_fixed_link(np))
|
||||
of_phy_deregister_fixed_link(np);
|
||||
failed_phy:
|
||||
of_node_put(phy_node);
|
||||
failed_phy:
|
||||
dev_id--;
|
||||
failed_ioremap:
|
||||
free_netdev(ndev);
|
||||
dev_id--;
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user