提交 0a14c1d0 编写于 作者: L Liang He 提交者: Felix Fietkau

mediatek: mt76: mac80211: Fix missing of_node_put() in mt76_led_init()

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

Fixes: 17f1de56 ("mt76: add common code shared between multiple chipsets")
Signed-off-by: NLiang He <windhl@126.com>
Signed-off-by: NFelix Fietkau <nbd@nbd.name>
上级 8950a62f
......@@ -216,6 +216,7 @@ static int mt76_led_init(struct mt76_dev *dev)
if (!of_property_read_u32(np, "led-sources", &led_pin))
dev->led_pin = led_pin;
dev->led_al = of_property_read_bool(np, "led-active-low");
of_node_put(np);
}
return led_classdev_register(dev->dev, &dev->led_cdev);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册