[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <E1q6roe-00Cfb6-TS@rmk-PC.armlinux.org.uk>
Date: Wed, 07 Jun 2023 12:59:04 +0100
From: "Russell King (Oracle)" <rmk+kernel@...linux.org.uk>
To: Andrew Lunn <andrew@...n.ch>,
Heiner Kallweit <hkallweit1@...il.com>
Cc: "David S. Miller" <davem@...emloft.net>,
Eric Dumazet <edumazet@...gle.com>,
Ioana Ciornei <ioana.ciornei@....com>,
Jakub Kicinski <kuba@...nel.org>,
Madalin Bucur <madalin.bucur@....com>,
netdev@...r.kernel.org,
Paolo Abeni <pabeni@...hat.com>,
Sean Anderson <sean.anderson@...o.com>
Subject: [PATCH net-next v2 11/11] net: fman_memac: use pcs-lynx's check for
fwnode availability
Use pcs-lynx's check rather than our own when determining if the device
is available. This fixes a bug where the reference gained by
of_parse_phandle() is not dropped if the device is not available.
Signed-off-by: Russell King (Oracle) <rmk+kernel@...linux.org.uk>
---
drivers/net/ethernet/freescale/fman/fman_memac.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/net/ethernet/freescale/fman/fman_memac.c b/drivers/net/ethernet/freescale/fman/fman_memac.c
index 4fbdae996d05..3b75cc543be9 100644
--- a/drivers/net/ethernet/freescale/fman/fman_memac.c
+++ b/drivers/net/ethernet/freescale/fman/fman_memac.c
@@ -1042,7 +1042,7 @@ static struct phylink_pcs *memac_pcs_create(struct device_node *mac_node,
struct phylink_pcs *pcs;
node = of_parse_phandle(mac_node, "pcsphy-handle", index);
- if (!node || !of_device_is_available(node))
+ if (!node)
return ERR_PTR(-ENODEV);
pcs = lynx_pcs_create_fwnode(of_fwnode_handle(node));
--
2.30.2
Powered by blists - more mailing lists