Received: by 2002:a05:6358:4e97:b0:b3:742d:4702 with SMTP id ce23csp2929946rwb; Mon, 15 Aug 2022 14:15:46 -0700 (PDT) X-Google-Smtp-Source: AA6agR5/HKuZmuak/XOJUMNyeXSGz3gLGmY/fBkqLEDOEpNVte75ZMLi/andMEMxq9Mb6rsJ3lqp X-Received: by 2002:a17:90a:8a8d:b0:1f3:155:3324 with SMTP id x13-20020a17090a8a8d00b001f301553324mr19886803pjn.89.1660598146056; Mon, 15 Aug 2022 14:15:46 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1660598146; cv=none; d=google.com; s=arc-20160816; b=LYNIjadcrFg3M9HSjxvRNuJYXhzEMaCDLujd/jlqhZyywG+x/HnRXsJFp3K9uC8UT4 WimjjcfV+EqiuDndYwMKeTbf1r8t0Xn8EuVr0p6jb4BdkUhX47aWpnaXv/+GKMXyWOHs r2SkQX2t2A+DliOiGlshD85PXObMQ9vkYA8Mx420Z7n8dvOw6YisSN3NLpqVlSVnMIG+ fGrdVTouN0BcvxSCCIowI1g/Tmgt2EuB7fjmej+/F0AnxsM3mgO4JCmi1WCybetqENp4 g0rhdVSEx1VO0kk1jVqD+ux4NbvqtzYRE2cxkCpKGOoqSXcvD0O1rotZgZDNdrWdJgJa x/4w== 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=38q92YX3hV/Yqd5bRo7tl1I0Q8W0mRz3Z5cS8jVQA3g=; b=ZwOjlsT6S/4IgM0eAAdhdRohxXP79qWcvgcX+GbDTvNpRE9Vb/7kEHQDnEb7E7Bhty SIIhMhURntPVHVHpLoEwHpjo9IMWKC/7p7wq5Fr/XS1fjWDPy1kPwHSWI74C1XxhIq7k PkgogyjecAplD/E2aklESBPyERTudfzberLJ387TxTF7+dnZlHCtBFzzhbBhr006PLsS Kv5Ncrg4/LmpaU1NAIE5ijIv3z3ktSWtRT7HT2mQrI6UAZxLxfbgwdXSz6s/WVfMAAtz rwM4L3J/D+bKFDS3WwW+K9tXW8+2o+lXel3YHev+dGARS2ojlzl943FR+K/vkPnCE332 Bivg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=Shu9OyJ5; 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 g11-20020a65594b000000b0041cda12f984si11671398pgu.20.2022.08.15.14.15.32; Mon, 15 Aug 2022 14:15:46 -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=Shu9OyJ5; 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 S243113AbiHOVPA (ORCPT + 99 others); Mon, 15 Aug 2022 17:15:00 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:45990 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1347972AbiHOVHv (ORCPT ); Mon, 15 Aug 2022 17:07:51 -0400 Received: from ams.source.kernel.org (ams.source.kernel.org [IPv6:2604:1380:4601:e00::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 127A62DA9D; Mon, 15 Aug 2022 12:17:13 -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 C0710B81106; Mon, 15 Aug 2022 19:17:11 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 10009C433D6; Mon, 15 Aug 2022 19:17:09 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1660591030; bh=fYbP1YflV4hH15QKYSOkjKnLIBRWSIwhXtLP5OnT6Kc=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=Shu9OyJ5f2NgUyT963J5HT8SJ3W5LPB4+cKPrVT7vp0FyNoOv0Uh0MNvbZNKfdAZr s8/P9b1q63oNQIMKGAuHkhWQuCG+wtQytPlWUVUF7OP4dd8TNuvU9XsXmUTf6AhxVO qbk3r2DPEaHwFWStGHsQg49jC0DpjQLaNwdXiCvw= 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.18 0449/1095] mediatek: mt76: mac80211: Fix missing of_node_put() in mt76_led_init() Date: Mon, 15 Aug 2022 19:57:28 +0200 Message-Id: <20220815180448.203829608@linuxfoundation.org> X-Mailer: git-send-email 2.37.2 In-Reply-To: <20220815180429.240518113@linuxfoundation.org> References: <20220815180429.240518113@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 8a2fedbb1451..2cd7b3f1db64 100644 --- a/drivers/net/wireless/mediatek/mt76/mac80211.c +++ b/drivers/net/wireless/mediatek/mt76/mac80211.c @@ -210,6 +210,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