[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <20230103065038.2174637-1-seanga2@gmail.com>
Date: Tue, 3 Jan 2023 01:50:38 -0500
From: Sean Anderson <seanga2@...il.com>
To: Madalin Bucur <madalin.bucur@....com>,
"David S . Miller" <davem@...emloft.net>,
Sean Anderson <sean.anderson@...o.com>, netdev@...r.kernel.org
Cc: Paolo Abeni <pabeni@...hat.com>,
Eric Dumazet <edumazet@...gle.com>,
Jakub Kicinski <kuba@...nel.org>,
Christian Zigotzky <info@...osoft.de>,
linux-kernel@...r.kernel.org, Sean Anderson <seanga2@...il.com>
Subject: [PATCH net] 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@...osoft.de>
Signed-off-by: Sean Anderson <seanga2@...il.com>
---
drivers/net/ethernet/freescale/fman/fman_dtsec.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/net/ethernet/freescale/fman/fman_dtsec.c b/drivers/net/ethernet/freescale/fman/fman_dtsec.c
index 3c87820ca202..3462f2b78680 100644
--- a/drivers/net/ethernet/freescale/fman/fman_dtsec.c
+++ b/drivers/net/ethernet/freescale/fman/fman_dtsec.c
@@ -1431,7 +1431,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,
--
2.37.1
Powered by blists - more mailing lists