Skip to contentSkip to conversation

mediatek: mt7915: fix missing of_node_put() in mt7986_wmac_coninfra_setup

PATCH New Liang He 1 participant 1 message Jul 4, 2022

Subsystems (2)
lore
Share & tools
lore

Liang He

author
#0 lore raw

PATCH 1/1 mediatek: mt7915: fix missing of_node_put() in mt7986_wmac_coninfra_setup

We should use of_node_put() for the reference 'np' returned by of_parse_phandle() which will increase the refcount.

Fixes 99ad32a4ca3a ("mt76: mt7915: add support for MT7986")
---
 drivers/net/wireless/mediatek/mt76/mt7915/soc.c | 1 +
 1 file changed, 1 insertion(+)
drivers/net/wireless/mediatek/mt76/mt7915/soc.c +1 -0
index c74afa746251..ee7ddda4288b 100644
@@ -278,6 +278,7 @@ static int mt7986_wmac_coninfra_setup(struct mt7915_dev *dev)
 		return -EINVAL;
 
 	rmem = of_reserved_mem_lookup(np);
+	of_node_put(np);
 	if (!rmem)
 		return -EINVAL;
 
Signature · 1 line
2.25.1