net: dpaa: Fix dtsec check for PCS availability
Subsystems (3)
PATCH 1/1 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.
---
drivers/net/ethernet/freescale/fman/fman_dtsec.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/net/ethernet/freescale/fman/fman_dtsec.c +1 -1
@@ -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,
Signature · 1 line
2.37.1
Quoted 1 line · Tue, Jan 03, 2023 at 07:50:38AM CET, [email protected] wrote:
We want to fail if the PCS is not available, not if it is available. Fix
It is odd to read plural maiestaticus in patch desctiption :) Better to stick with describing what code does wrong and then telling the codebase what to do.
Quoted 5 lines
this condition.
Fixes 5d93cfcf7360 ("net: dpaa: Convert to phylink")Reported-by Christian Zigotzky <[email protected]>Signed-off-by Sean Anderson <[email protected]>
Quoted 6 lines · Jiri Pirko
Quoted 1 line · Tue, Jan 03, 2023 at 07:50:38AM CET, [email protected] wrote:
We want to fail if the PCS is not available, not if it is available. Fix
It is odd to read plural maiestaticus in patch desctiption :) Better to stick with describing what code does wrong and then telling the codebase what to do.
Writing a kernel is a collaborative effort :)
Quoted 7 lines
Quoted 5 lines
this condition.
Fixes 5d93cfcf7360 ("net: dpaa: Convert to phylink")Reported-by Christian Zigotzky <[email protected]>Signed-off-by Sean Anderson <[email protected]>Reviewed-by Jiri Pirko <[email protected]>
This patch was applied to netdev/net.git (master) by David S. Miller <[email protected]>:
Hello:
This patch was applied to netdev/net.git (master)
by David S. Miller <[email protected]>:
Quoted 8 lines · On Tue, 3 Jan 2023 01:50:38 -0500 you wrote:
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 <[email protected]>Signed-off-by Sean Anderson <[email protected]>[...]
Here is the summary with links:
- [net] net: dpaa: Fix dtsec check for PCS availability
https://git.kernel.org/netdev/net/c/7dc618385419
You are awesome, thank you!
Signature · 2 lines
Deet-doot-dot, I am a bot. https://korg.docs.kernel.org/patchwork/pwbot.html