Received: by 2002:a05:6358:5282:b0:b5:90e7:25cb with SMTP id g2csp3409017rwa; Tue, 23 Aug 2022 04:24:52 -0700 (PDT) X-Google-Smtp-Source: AA6agR6fOoN6tU14F+wK/8U9Ah9tAr4iW+rUL4TRWS6ppBqPneq0Jo9q4MYWX5Tiwh/j8aESJ8Ej X-Received: by 2002:a63:564f:0:b0:425:f2cd:d0ce with SMTP id g15-20020a63564f000000b00425f2cdd0cemr19918907pgm.143.1661253770515; Tue, 23 Aug 2022 04:22:50 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1661253770; cv=none; d=google.com; s=arc-20160816; b=G13WO4kNuRV7ZZGkW6bfB6VxREMlWCfNkqsm5zU7C6fPqeBAQx4DKQQ+bdEI6ELEaI 6wg5Xr7NDo8Ae8jvj6hfF5XZujui86gI0cDJ9bUe0+blbOr0s15+vDUZrAM33JsieVIq P5Hz96uiyfZDXmYzFvnvweNCCaOHlvzWlIagEeKZUHnVXV+QRlcaEZv0CGsPYQKgwk+g h/+0RprtWAARoFfprnkls1qP6EsTr1oW04gpDDvcc9/qJOn7nI7SoctA6jZItYYtyWXz IrfxzbaIMiYM6f6Ty/7rcNAwv8gS3SNoQxugUdxWpT3anDHLNdcKAyQPg3Ry2doad+od 7xKQ== 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=ZtOnvYGl/Y3MR4W7xuM9614vumU7h1BzZrT+oNwi8tw=; b=oXMAAYcU/s/j35qR1Gr9ImvG2X+ZKhqKFtXm+tjBN47g+oCoJefQ7/Wj+0a2h5tnte zYYBDm/RGRL7Iau0qd5EtCVBBjVVAbGjvnfWUsZ81gTu6p4+Ga2GYTQr2Z/cqHeujTOZ cNbxOwZ5BX6iSVqeFtIeNKFoK3gjVxaqiWSjXxJgy3gBN2P2Qs5h7XYHBoxje8r0+SDv Y2felui2aHLz1eR7fak/EEbPdr77ZjZwnLvPGiKh7FAJWjVT2XfMvhnzfuYycqxanCON CZxdzaO0PPzWNBIZ1uM7y62s/3YlW9hH9H6Xpqs5vatyG3uSvSt5zVkTsNrUg57eO1t5 yTTQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b="qB/NlVcL"; 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 l185-20020a6391c2000000b004215af6990dsi13040673pge.206.2022.08.23.04.22.38; Tue, 23 Aug 2022 04:22:50 -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="qB/NlVcL"; 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 S1355377AbiHWKf5 (ORCPT + 99 others); Tue, 23 Aug 2022 06:35:57 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:42802 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1354355AbiHWKVR (ORCPT ); Tue, 23 Aug 2022 06:21:17 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [IPv6:2604:1380:4641:c500::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 1F54A1DB; Tue, 23 Aug 2022 02:02:39 -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 ADDEF6157E; Tue, 23 Aug 2022 09:02:38 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 97A13C433C1; Tue, 23 Aug 2022 09:02:37 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1661245358; bh=YhgF2yt0u3VyqWuFgGE9+OCvXB5d0Chiy9PsctpcyxA=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=qB/NlVcLkdDGe5RWP0rBCr6Hd3nLbXuTLqx08dpq0p7QIbLSLaUdEW6R3ijcxcP9Q 4kbeiXBXaPQrOCX5fKxul9+cOdfAxv5VIEMQyKLXQpFKQyfk4seUr/Anl7RFKPWHk2 sN0UExbQzi4Ck3sZ+Nz/P39Z7Mh4D37Ti4EhH6X0= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Miaoqian Lin , Martin Blumenstingl , Neil Armstrong , Sasha Levin Subject: [PATCH 4.19 054/287] meson-mx-socinfo: Fix refcount leak in meson_mx_socinfo_init Date: Tue, 23 Aug 2022 10:23:43 +0200 Message-Id: <20220823080102.063352576@linuxfoundation.org> X-Mailer: git-send-email 2.37.2 In-Reply-To: <20220823080100.268827165@linuxfoundation.org> References: <20220823080100.268827165@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: Miaoqian Lin [ Upstream commit a2106f38077e78afcb4bf98fdda3e162118cfb3d ] of_find_matching_node() returns a node pointer with refcount incremented, we should use of_node_put() on it when not need anymore. Add missing of_node_put() to avoid refcount leak. Fixes: 5e68c0fc8df8 ("soc: amlogic: Add Meson6/Meson8/Meson8b/Meson8m2 SoC Information driver") Signed-off-by: Miaoqian Lin Reviewed-by: Martin Blumenstingl Signed-off-by: Neil Armstrong Link: https://lore.kernel.org/r/20220524065729.33689-1-linmq006@gmail.com Signed-off-by: Sasha Levin --- drivers/soc/amlogic/meson-mx-socinfo.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/soc/amlogic/meson-mx-socinfo.c b/drivers/soc/amlogic/meson-mx-socinfo.c index 78f0f1aeca57..92125dd65f33 100644 --- a/drivers/soc/amlogic/meson-mx-socinfo.c +++ b/drivers/soc/amlogic/meson-mx-socinfo.c @@ -126,6 +126,7 @@ static int __init meson_mx_socinfo_init(void) np = of_find_matching_node(NULL, meson_mx_socinfo_analog_top_ids); if (np) { analog_top_regmap = syscon_node_to_regmap(np); + of_node_put(np); if (IS_ERR(analog_top_regmap)) return PTR_ERR(analog_top_regmap); -- 2.35.1