Received: by 2002:a05:6358:5282:b0:b5:90e7:25cb with SMTP id g2csp3407401rwa; Tue, 23 Aug 2022 04:23:09 -0700 (PDT) X-Google-Smtp-Source: AA6agR4o31WeQlAYv7wnfFXZwxbFITEifiJ2lIkavGsbsDakqIeWZd46siUZMhcr1LXo6+vSqbOu X-Received: by 2002:a63:88c8:0:b0:41d:3dbb:4d5b with SMTP id l191-20020a6388c8000000b0041d3dbb4d5bmr20154562pgd.140.1661253789361; Tue, 23 Aug 2022 04:23:09 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1661253789; cv=none; d=google.com; s=arc-20160816; b=PHxTRMoxl5CCHUhsSZJGL9Iq4NJ5yAWMfcvl1Ikr9lHFOw9DXcHAgwARLy3EqGL9yX qGNnKuU+WoFgcBi7RzfSvNdDUD5cAIpbbJ1qZLluuoJPK0ns5OHnZXlYJZ/uzyhiXJq/ UrbLS2tpNkR8TU5MLPRAZxZmIwBUuPndVfFQy8m/oL8HVEQD7LcsHkRTy5uh6SabWhcz guH8CkFsJ0it7uPo1oOzDNoBj9NGsUM6pJqAzFMUQu/xCCJJv5qFgwvetVTvRUSPlByE frs8YDG3B84YFRuB31sgDGyy2N9IdQ31582rJx8yPTWDYEMaf+VXGNCXAugpOkU9H+df Bg/w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=wct62aO/GF5YTp2XDdsyxrjaVWqkKCking+goKbWsPg=; b=bs6Qca+is4GY9rp91jNSbeAu/TAGjyXCw1243lvDenGk8KZ0ZXSfuYo73dbYOCLavW Rk1zCWsntJTNJnf4LANhZX9uxiDPyIF39qBtQEsOAXubaHb/3pfBxtgP7WUppGrTKh+9 4KHtlseMigRMCFomwrwa8yCyd1RuTVRIVEjkTDinOCEONmK7cegrzueam7XMIzy1zbMt pZUnI7FTdzVIEPQtF3/qPCE9z60403ebEaJKyiw1ZGpV9t4YK2dHAZ2USfQ8bA6wU5Tg G/ntOd1iVmp4NSQmxgGnj++UWccWFPtoSSu7YqvBEiqj3VNSUPGM0O1vwKPmJybi1/QJ TYfQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=0HplqmVh; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id l8-20020a63ea48000000b0041b577f3356si14476246pgk.720.2022.08.23.04.22.57; Tue, 23 Aug 2022 04:23:09 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=0HplqmVh; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1349629AbiHWKiz (ORCPT + 99 others); Tue, 23 Aug 2022 06:38:55 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:44020 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1355249AbiHWKXW (ORCPT ); Tue, 23 Aug 2022 06:23:22 -0400 Received: from ams.source.kernel.org (ams.source.kernel.org [145.40.68.75]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 535929BB50; Tue, 23 Aug 2022 02:04:20 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ams.source.kernel.org (Postfix) with ESMTPS id B38A1B81C53; Tue, 23 Aug 2022 09:04:18 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 0E8FCC433D7; Tue, 23 Aug 2022 09:04:16 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1661245457; bh=C+xVUrKAbI48SofDpEDFTkF7+biqsKNrNaN/gh1hoQc=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=0HplqmVhL0t585CKXFkwjcN0Bs/zJ008zhfkiJATppZwZE5I8FhJJAcVjT538/e1e rE5RrwtWds4xWr2GC/UNNfYF+veYgzA2X13wn9F7SEsi0Mpaj8lRMCPC3ACy3LkyMN 2LE0mxBAFmAwOY0eeCqgKgChmlJqoqZwPUob3jIk= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Liang He , Felix Fietkau , Sasha Levin Subject: [PATCH 4.19 085/287] mediatek: mt76: mac80211: Fix missing of_node_put() in mt76_led_init() Date: Tue, 23 Aug 2022 10:24:14 +0200 Message-Id: <20220823080103.154616692@linuxfoundation.org> X-Mailer: git-send-email 2.37.2 In-Reply-To: <20220823080100.268827165@linuxfoundation.org> References: <20220823080100.268827165@linuxfoundation.org> User-Agent: quilt/0.67 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-7.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Liang He [ Upstream commit 0a14c1d0113f121151edf34333cdf212dd209190 ] 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 Signed-off-by: Felix Fietkau Signed-off-by: Sasha Levin --- drivers/net/wireless/mediatek/mt76/mac80211.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/net/wireless/mediatek/mt76/mac80211.c b/drivers/net/wireless/mediatek/mt76/mac80211.c index 1b5abd4816ed..203b888f38d8 100644 --- a/drivers/net/wireless/mediatek/mt76/mac80211.c +++ b/drivers/net/wireless/mediatek/mt76/mac80211.c @@ -114,6 +114,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 devm_led_classdev_register(dev->dev, &dev->led_cdev); -- 2.35.1