From 120f73ad992a4c9f7ec5283ec4083fc0aa4ab7ff Mon Sep 17 00:00:00 2001 From: Liang He Date: Mon, 4 Jul 2022 16:34:20 +0800 Subject: [PATCH] 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: 17f1de56df05 ("mt76: add common code shared between multiple chipsets") Signed-off-by: Liang He --- mac80211.c | 1 + 1 file changed, 1 insertion(+) diff --git a/mac80211.c b/mac80211.c index 4f233f0e7..a46884d6c 100644 --- a/mac80211.c +++ b/mac80211.c @@ -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);