Commit 8c1d0b33 authored by Russell King (Oracle)'s avatar Russell King (Oracle) Committed by Jakub Kicinski

net: dpaa2: use pcs-lynx's check for fwnode availability

Use pcs-lynx's check rather than our own when determining if the device
is available.
Signed-off-by: default avatarRussell King (Oracle) <rmk+kernel@armlinux.org.uk>
Signed-off-by: default avatarJakub Kicinski <kuba@kernel.org>
parent d143898c
......@@ -257,12 +257,6 @@ static int dpaa2_pcs_create(struct dpaa2_mac *mac,
return 0;
}
if (!fwnode_device_is_available(node)) {
netdev_err(mac->net_dev, "pcs-handle node not available\n");
fwnode_handle_put(node);
return -ENODEV;
}
pcs = lynx_pcs_create_fwnode(node);
fwnode_handle_put(node);
......@@ -271,6 +265,11 @@ static int dpaa2_pcs_create(struct dpaa2_mac *mac,
return -EPROBE_DEFER;
}
if (pcs == ERR_PTR(-ENODEV)) {
netdev_err(mac->net_dev, "pcs-handle node not available\n");
return PTR_ERR(pcs);
}
if (IS_ERR(pcs)) {
netdev_err(mac->net_dev,
"lynx_pcs_create_fwnode() failed: %pe\n", pcs);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment