Received: by 2002:a05:6358:4e97:b0:b3:742d:4702 with SMTP id ce23csp1887069rwb; Fri, 19 Aug 2022 11:04:49 -0700 (PDT) X-Google-Smtp-Source: AA6agR46sdvE8pNC8GkH0tJWuPdAoeDGwirV9dfq5iri2GErRqcPCtsGQgftz9rDteoauRrQM2FL X-Received: by 2002:a05:6402:2b8b:b0:43a:5475:f1ae with SMTP id fj11-20020a0564022b8b00b0043a5475f1aemr6877339edb.363.1660932288869; Fri, 19 Aug 2022 11:04:48 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1660932288; cv=none; d=google.com; s=arc-20160816; b=s9sgGGmHjqIZcpFegmx502P/eoEZxKbrhU8mDUBTbXOjjdRde3aB+O5MWStUCfDpem gs5UcTECIR3+0ifnipGmYdn4E+jZaYI0beoWiNuj5CQFC0UoSZt7xtFNQRBmdM0UkIRH 8yYdXQq0esFJPD/whJFesbsLGsD+rpnalgisnC7CSEz1SdLu4nADhcB0rt/vcinmPHgN BkttSNtSJY87nqhDaaqgdEqOl7X3WaDbmmsM9cwhUJFP/ihEBh564vlQYjkkLfTk08cC 3nbD1zDQhb651YcCNVm2DJf/vyJDfIRj2C2Swf7E+lQgzbCMHUb/DOpAeK2Zo3Ei8+Rq iQzA== 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=37LWrJclPFXgARQSBNFA9SXG1J+O36+DrCKdSq5GQug=; b=mgw/vAFW+lyDviNYTB2MYPzxEvkCxVhd5rGd/utYX2GgQZXb86bIieJZTwctGufek0 tsvLKJCbZMUpJgjc4/OS6tfHqMXKszX6Lerb56UkPG2FDni6RDQl4WsG/6xnFutBYALY ghs/AWTOFqgt65pJ3j+76E129/brpIMxxOuRxaamCHv6ShPnZLYXDzYNwecoEFBWhaGO M0fMuQskGwgHeeEPYz8+Jr8oXU6skpWgNjQoWm18DF4eqCaB0BmbMDz7D7XmoaBKcai1 tmooANcftq2UlneDiBpBQrn2OcqeKsLnsN0CK8TURXL/ivMY6ZcLOCeXD+YHtq9B06en x+lg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=mXaaG0YD; 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 j18-20020aa7c0d2000000b00435681044a9si3273765edp.372.2022.08.19.11.04.22; Fri, 19 Aug 2022 11:04:48 -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=mXaaG0YD; 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 S1351706AbiHSQLx (ORCPT + 99 others); Fri, 19 Aug 2022 12:11:53 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:47790 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1351661AbiHSQJU (ORCPT ); Fri, 19 Aug 2022 12:09:20 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D075910F69B; Fri, 19 Aug 2022 08:56:43 -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 34C8E616FC; Fri, 19 Aug 2022 15:56:42 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 3C104C433B5; Fri, 19 Aug 2022 15:56:41 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1660924601; bh=w4UVl0CIeJAj5h6BchLx1YNMb9CjnlmFsqhT+SC8Ywc=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=mXaaG0YDUSYAYo72vQOUlU/BnWf9Uz6jf89KeWeNmBtR+N2wKayfUK8QGK+ylkSE8 LHkOWu73rkAypGJ3k5I3OoKyH/VI0fn3rX8ZPgKFQTlVUFDuLAx8w+gHza7E7IYYJ6 CgRd03aXI0WIc50uANFHMBjqa7BobhAHXRZOKywo= 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.10 223/545] mediatek: mt76: mac80211: Fix missing of_node_put() in mt76_led_init() Date: Fri, 19 Aug 2022 17:39:53 +0200 Message-Id: <20220819153839.343902805@linuxfoundation.org> X-Mailer: git-send-email 2.37.2 In-Reply-To: <20220819153829.135562864@linuxfoundation.org> References: <20220819153829.135562864@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 466447a5184f..81ff3b4c6c1b 100644 --- a/drivers/net/wireless/mediatek/mt76/mac80211.c +++ b/drivers/net/wireless/mediatek/mt76/mac80211.c @@ -107,6 +107,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