Received: by 2002:a05:6358:4e97:b0:b3:742d:4702 with SMTP id ce23csp2920642rwb; Mon, 15 Aug 2022 14:05:00 -0700 (PDT) X-Google-Smtp-Source: AA6agR4peP2EGOc2Ucu7aK0/AsBQh9LXBiq0wyTIYE9oT8dS/pBX6KlygrxfUVxqo4MaeJDurbpD X-Received: by 2002:a63:1356:0:b0:41d:8edf:8ab1 with SMTP id 22-20020a631356000000b0041d8edf8ab1mr14837903pgt.268.1660597499881; Mon, 15 Aug 2022 14:04:59 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1660597499; cv=none; d=google.com; s=arc-20160816; b=PTStX1p813tYVjp7pfmJ+3cSuLFV5MjsvwxS2IdlHYf4hTC7w1q3cZ1vVioF/HWZgJ tWr81/2YPMzUzcAooZ9T+uyu+Tnq6f037yHYQOFW081hGsqNzD+rGlK9ysdVnpeam3y4 azwO7ABlGini0IHsQJOlTGHiKqvW86/etzuLGfQSMAmRRIOfLbyyTHOIIblh3w8keqTD sHHTPF2VfVZRF+j6v4AuPitKLmKF3kUdlhXh5wptudE/kH+DaMa44hBrvfy+qAg029ER HstSf/IrzFSZ1BkoLcRIfZiZAncVh2Ww9uZ01Aba/i2LXyxckfw4avGILtYe9eQpXP4P nTJQ== 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=uUsiUw9kG+67LrT0z7r3LUhTxLTffn+rQJtpykHpuFw=; b=fxB8ppEbfMxgywUCfakKXdl+pctSHK/7WzjsGmLKKGqmv3GnyBJnoMGrbFENRkhgFB 7OWGPlVeOM0hJ5IyKmEHd2EMYlbwwZKX8j/8xHZ0QN8XY49z/58dPwOR5ALcmDDly4D/ o9V5UsYDY42m0IJA7KgfghQOa2DGQnczcOhvzUKsrQoyGjYL3Yko20dQzUosbTszChCi 1Au4BkOcI+Chb4+XxQcSAE15QwgANZ9KGqyigQ0BHrs/uPsloOWu+uHyG+6hVVwaDlFo 4/8OenSn/KL57Qe8ec06bQhcVd7cobJ9KEkxN5f74/27HrGNxWtS1nB6B1yhEIBTNf/s UNVw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=dQINk7En; 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 i3-20020aa78b43000000b005286cc2b29bsi11220853pfd.253.2022.08.15.14.04.48; Mon, 15 Aug 2022 14:04:59 -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=dQINk7En; 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 S245116AbiHOTBT (ORCPT + 99 others); Mon, 15 Aug 2022 15:01:19 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49096 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S245135AbiHOS4t (ORCPT ); Mon, 15 Aug 2022 14:56:49 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 2557D32D83; Mon, 15 Aug 2022 11:31:50 -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 dfw.source.kernel.org (Postfix) with ESMTPS id B610060EEB; Mon, 15 Aug 2022 18:31:49 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id B9DD3C433C1; Mon, 15 Aug 2022 18:31:48 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1660588309; bh=lXmSoEFvjXAkURKNKmyiZ+4nCTy+7MrPzpLlojqoji4=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=dQINk7EnmIyBP4JCnkvhvFRPq8DVY3qvhxNVBtr6H0oMIhHa2rzaWdxLCJLGWE0p2 8GPegJdsAT5sAux8dFwEUPJw75/lqpqVLfboNdOOUX+eU3Dg4RIigBIhvI7Z+7p5H/ G28SCm6MVXhvTIX3InxfLS6Sy+g4NBVReaR/uMRQ= 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 5.15 331/779] mediatek: mt76: mac80211: Fix missing of_node_put() in mt76_led_init() Date: Mon, 15 Aug 2022 19:59:35 +0200 Message-Id: <20220815180351.441197342@linuxfoundation.org> X-Mailer: git-send-email 2.37.2 In-Reply-To: <20220815180337.130757997@linuxfoundation.org> References: <20220815180337.130757997@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 029599d68ca7..028519a739fd 100644 --- a/drivers/net/wireless/mediatek/mt76/mac80211.c +++ b/drivers/net/wireless/mediatek/mt76/mac80211.c @@ -123,6 +123,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); -- 2.35.1