Received: by 2002:a05:6358:4e97:b0:b3:742d:4702 with SMTP id ce23csp3087725rwb; Mon, 15 Aug 2022 17:49:48 -0700 (PDT) X-Google-Smtp-Source: AA6agR5uasZ1H823fVP3bzDfTv8cAxYISxzKWJyPrIO+Ox/Y13nNOwNM3TJblWbQbR497kwLZgoo X-Received: by 2002:a17:907:284a:b0:731:5a2f:655a with SMTP id el10-20020a170907284a00b007315a2f655amr11588866ejc.403.1660610987869; Mon, 15 Aug 2022 17:49:47 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1660610987; cv=none; d=google.com; s=arc-20160816; b=hjIxlXbUE9TDg1KynYCNQXYY5JTvTXNwiuZkoINnTJeDDVgUXZ3rfH2wy4X2CGZm64 CAFjBNu/kCx4fBycOnlz4Mw5KmpWdWCmdFs9enW7WoYueR5G5t/g/tAkN1W3b1SShitg U23myYDhI5qdl1QGP+obLK/pkJ9eJs749SWjZVvOT1MP1t3MlZECSLwVc9SqpFu/hCD2 NBV5DrO5qBJgq+wTNApeSV45GeFLaTUisOi6dlsx2VKs9JYKXUPr23IZ84+QzZNj67gX BEdG24ygpOM691lEk+Ef+ojB6uPipAudb8cEAwjM4oKt4qSMur1W3TiZIrgauEZDiCKS yMbQ== 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=pLH+DrArNtLwoB+NHnslmhGqMt4wGESfdxQs/PM4Kow=; b=F1DClPGEP6LhBdn+8McbH1AFjLEymougj4QzVMO//F0XvqhK4cQSBhzDQtvtd+Ybtq sClybFOAk+4hjcLaze+oFnNSFbScvPBS+hQl3xWgbztmUWyoUgDQ6rNYz0Pdc/hIrVtd VVJA+aTr5C08ZPq/mSfBb5n/FFMfrTsXwoNNhxc7DLbRnjU79gLaA+gWj35uqs4LT0HE WkvbNeQOdZLYA3G9nroGLeVFnXn/hBiMbnX9ao5ImMTDdHam+W5IBjMLlqwN+oiGJ97M vqybne0lPFg8dd/iEMszFiZyX5g321FWwxk9KSPINs71C+BraGpeGZbrYXGiPkwfhTxz fS+g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=hCx2m03L; 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 g3-20020a1709065d0300b007317274bb0dsi9530997ejt.979.2022.08.15.17.49.22; Mon, 15 Aug 2022 17:49:47 -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=hCx2m03L; 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 S1355319AbiHOXz4 (ORCPT + 99 others); Mon, 15 Aug 2022 19:55:56 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56896 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1354783AbiHOXua (ORCPT ); Mon, 15 Aug 2022 19:50:30 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 77EE549B45; Mon, 15 Aug 2022 13:16:01 -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 002376069F; Mon, 15 Aug 2022 20:16:00 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 038F8C433D6; Mon, 15 Aug 2022 20:15:59 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1660594560; bh=pO8ogma8hs72Z3ZJS12tZZiKWtNKVNLhsN9eq5cKZHc=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=hCx2m03LA+PYA1YLWaPGDaBBw6NY7bnJA8yAxIkCFSkMt1sJHyHo0d5YsLixPnAoN ZlWxLLSSkdAsa5Iqu6RWt5XtGVcnOblhc0eI1NFSJMp0YkDcO5Dl4BA/6LmXlwo0Bm WysfoMlS1zzKz+HL9XOfFrKz7LYopEBLLqSX8U+g= 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.19 0487/1157] mediatek: mt76: mac80211: Fix missing of_node_put() in mt76_led_init() Date: Mon, 15 Aug 2022 19:57:23 +0200 Message-Id: <20220815180459.101453001@linuxfoundation.org> X-Mailer: git-send-email 2.37.2 In-Reply-To: <20220815180439.416659447@linuxfoundation.org> References: <20220815180439.416659447@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 5f75a8945a6e..a520f9ac2799 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