mirror of
https://github.com/torvalds/linux.git
synced 2026-05-27 16:44:58 +02:00
net: fman_memac: use pcs-lynx's check for fwnode availability
Use pcs-lynx's check rather than our own when determining if the device is available. This fixes a bug where the reference gained by of_parse_phandle() is not dropped if the device is not available. Signed-off-by: Russell King (Oracle) <rmk+kernel@armlinux.org.uk> Signed-off-by: Jakub Kicinski <kuba@kernel.org>
This commit is contained in:
parent
8c1d0b339d
commit
32fc30353f
|
|
@ -1042,7 +1042,7 @@ static struct phylink_pcs *memac_pcs_create(struct device_node *mac_node,
|
|||
struct phylink_pcs *pcs;
|
||||
|
||||
node = of_parse_phandle(mac_node, "pcsphy-handle", index);
|
||||
if (!node || !of_device_is_available(node))
|
||||
if (!node)
|
||||
return ERR_PTR(-ENODEV);
|
||||
|
||||
pcs = lynx_pcs_create_fwnode(of_fwnode_handle(node));
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user