From nobody Mon Sep 29 20:17:13 2025 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id CE650C3276A for ; Mon, 15 Aug 2022 23:56:35 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1355332AbiHOXz4 (ORCPT ); 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-Transfer-Encoding: quoted-printable Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Type: text/plain; charset="utf-8" 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 chipset= s") 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/wi= reless/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 =3D led_pin; dev->led_al =3D of_property_read_bool(np, "led-active-low"); + of_node_put(np); } =20 return led_classdev_register(dev->dev, &dev->led_cdev); --=20 2.35.1