Thread (3 messages) 3 messages, 3 authors, 2020-08-23

Re: [PATCH V2] net: dsa: Add of_node_put() before break statement

From: Andrew Lunn <andrew@lunn.ch>
Date: 2020-08-23 19:13:24
Also in: linux-mediatek, lkml, netdev

quoted hunk ↗ jump to hunk
diff --git a/drivers/net/dsa/mt7530.c b/drivers/net/dsa/mt7530.c
index 8dcb8a49ab67..e81198a65c26 100644
--- a/drivers/net/dsa/mt7530.c
+++ b/drivers/net/dsa/mt7530.c
@@ -1327,6 +1327,7 @@ mt7530_setup(struct dsa_switch *ds)
 			if (phy_node->parent == priv->dev->of_node->parent) {
 				ret = of_get_phy_mode(mac_np, &interface);
 				if (ret && ret != -ENODEV)
+					of_node_put(mac_np)
 					return ret;
 				id = of_mdio_parse_addr(ds->dev, phy_node);
 				if (id == 0)
You are missing some { }. And a ; . I'm surprised gcc did not warn
you!

    Andrew

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help