linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] dpaa2-mac: Add a missing of_node_put after of_device_is_available
@ 2020-12-06 15:13 Christophe JAILLET
  2020-12-07 15:04 ` Ioana Ciornei
  0 siblings, 1 reply; 3+ messages in thread
From: Christophe JAILLET @ 2020-12-06 15:13 UTC (permalink / raw)
  To: ioana.ciornei, ruxandra.radulescu, davem, kuba
  Cc: netdev, linux-kernel, kernel-janitors, Christophe JAILLET

Add an 'of_node_put()' call when a tested device node is not available.

Fixes:94ae899b2096 ("dpaa2-mac: add PCS support through the Lynx module")
Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
---
 drivers/net/ethernet/freescale/dpaa2/dpaa2-mac.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/net/ethernet/freescale/dpaa2/dpaa2-mac.c b/drivers/net/ethernet/freescale/dpaa2/dpaa2-mac.c
index 90cd243070d7..828c177df03d 100644
--- a/drivers/net/ethernet/freescale/dpaa2/dpaa2-mac.c
+++ b/drivers/net/ethernet/freescale/dpaa2/dpaa2-mac.c
@@ -269,6 +269,7 @@ static int dpaa2_pcs_create(struct dpaa2_mac *mac,
 
 	if (!of_device_is_available(node)) {
 		netdev_err(mac->net_dev, "pcs-handle node not available\n");
+		of_node_put(node);
 		return -ENODEV;
 	}
 
-- 
2.27.0


^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2020-12-08  1:59 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-12-06 15:13 [PATCH] dpaa2-mac: Add a missing of_node_put after of_device_is_available Christophe JAILLET
2020-12-07 15:04 ` Ioana Ciornei
2020-12-08  1:58   ` Jakub Kicinski

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).