summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSean Anderson <seanga2@gmail.com>2023-01-03 07:50:38 +0100
committerDavid S. Miller <davem@davemloft.net>2023-01-03 10:23:17 +0100
commit7dc61838541928895abae6d2355258e02a251bba (patch)
tree8fd7fa8fd1c567981c4a9115b71310cee33a0a3b
parentocteontx2-pf: Fix lmtst ID used in aura free (diff)
downloadlinux-7dc61838541928895abae6d2355258e02a251bba.tar.xz
linux-7dc61838541928895abae6d2355258e02a251bba.zip
net: dpaa: Fix dtsec check for PCS availability
We want to fail if the PCS is not available, not if it is available. Fix this condition. Fixes: 5d93cfcf7360 ("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>
-rw-r--r--drivers/net/ethernet/freescale/fman/fman_dtsec.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/net/ethernet/freescale/fman/fman_dtsec.c b/drivers/net/ethernet/freescale/fman/fman_dtsec.c
index d00bae15a901..d528ca681b6f 100644
--- a/drivers/net/ethernet/freescale/fman/fman_dtsec.c
+++ b/drivers/net/ethernet/freescale/fman/fman_dtsec.c
@@ -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,