Skip to content

Commit

Permalink
net: dpaa: Fix dtsec check for PCS availability
Browse files Browse the repository at this point in the history
We want to fail if the PCS is not available, not if it is available. Fix
this condition.

Fixes: 5d93cfc ("net: dpaa: Convert to phylink")
Reported-by: Christian Zigotzky <info@xenosoft.de>
Signed-off-by: Sean Anderson <seanga2@gmail.com>
Reviewed-by: Jiri Pirko <jiri@nvidia.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
Sean Anderson authored and David S. Miller committed Jan 3, 2023
1 parent 4af1b64 commit 7dc6183
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/net/ethernet/freescale/fman/fman_dtsec.c
Original file line number Diff line number Diff line change
Expand Up @@ -1430,7 +1430,7 @@ int dtsec_initialization(struct mac_device *mac_dev,
dtsec->dtsec_drv_param->tx_pad_crc = true;

phy_node = of_parse_phandle(mac_node, "tbi-handle", 0);
if (!phy_node || of_device_is_available(phy_node)) {
if (!phy_node || !of_device_is_available(phy_node)) {
of_node_put(phy_node);
err = -EINVAL;
dev_err_probe(mac_dev->dev, err,
Expand Down

0 comments on commit 7dc6183

Please sign in to comment.