Received: by 2002:a05:6358:4e97:b0:b3:742d:4702 with SMTP id ce23csp2883341rwb; Mon, 15 Aug 2022 13:15:32 -0700 (PDT) X-Google-Smtp-Source: AA6agR4aHeXOrUS4kZVhLsMInJhI2PF6aYKD48h1yJ47dqmlEcDNLnuhCDGN4Z6hOj5+nSbAb+0O X-Received: by 2002:a17:907:7fa1:b0:734:b26a:17bc with SMTP id qk33-20020a1709077fa100b00734b26a17bcmr11283002ejc.157.1660594532174; Mon, 15 Aug 2022 13:15:32 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1660594532; cv=none; d=google.com; s=arc-20160816; b=M2nvQIIQV963zOOxI110y4xEFeba+3pEMQLwp+wiLhnsFhCfUF/+4Syy5xdRiMhtMZ US5EmY5TXpExHPQ3bl4dMUeypDuLPijKszwHIseerr+nSbfXGhSruUeRk/O7NT6G7vEn Ttz1xOJjmLQLEfSPZ1YpCbgUHlFBfp4FMUVAdQPcaeav7AeDQgHE0M5jatTe35EMyKLl vSlXel7m6z6UxgE/KB8AklIz96D1o1VnlmRqFD2BaTd7BMZWvovja75xeigLjNRM6HI7 VTZJJ4Qjyf4lF0eFivFF7H9RLodaynZ94TjGVGvXos+AoT0mmcQGBGHZHFhG9Wvh6Dde gTrA== 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=Ih7MbhbPaRZ/glGIoLGH8a0GKgoXa0yGdA/Q4H8rOAURFA7rmnCnEO8iTyiXMi3NdL I7NJ1vwojpoM0BwNznxe1CbwM8KRGPlvydS8O/h83Vk81esKrranHUFhf9l4QxJ6lvtj akItlXwV5xWPBRVMwF5SPqLo7X4VAtZPQPk9nM0YbXuP+sJ+ghDyr2ocsYePLykEVzQQ h6+wBgLs/SRHlUkg5ovELJOZUXIowmWXBCnLQx2/Adt238JsaYjpHWMpjGfdnCsbOqji 0V5AUEFinZYUTHlql4fzj1l8aqz9q9ywZOSJPyCpiTmWWoUax/EeVW1mi2mxqjModfcF JH4A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=eDL9j2tg; 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 sd5-20020a1709076e0500b007330a081f1fsi8225391ejc.679.2022.08.15.13.15.06; Mon, 15 Aug 2022 13:15:32 -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=eDL9j2tg; 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 S243677AbiHOSgx (ORCPT + 99 others); Mon, 15 Aug 2022 14:36:53 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50636 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S243570AbiHOSfW (ORCPT ); Mon, 15 Aug 2022 14:35:22 -0400 Received: from ams.source.kernel.org (ams.source.kernel.org [145.40.68.75]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C50E23A4BE; Mon, 15 Aug 2022 11:22:33 -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 65D93B8105B; Mon, 15 Aug 2022 18:22:33 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id ADD51C43140; Mon, 15 Aug 2022 18:22:31 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1660587752; bh=YhgF2yt0u3VyqWuFgGE9+OCvXB5d0Chiy9PsctpcyxA=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=eDL9j2tg0WHyjnAKEdsXu0gnI9FI64NHoW9gHABLU1cDipaP1hJf8F8JclFVbp4z3 278vnu8M+8yYO1k1wrEVyncE8v2nGqz3Xpw4lyDUueqi0sP/PlkTtieJY6ZMFEyh5D NcxdGgGdORm1Aiml7XkC1pR6rEzvNNRzJKr0Cwdc= 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 5.15 156/779] meson-mx-socinfo: Fix refcount leak in meson_mx_socinfo_init Date: Mon, 15 Aug 2022 19:56:40 +0200 Message-Id: <20220815180344.000701974@linuxfoundation.org> X-Mailer: git-send-email 2.37.2 In-Reply-To: <20220815180337.130757997@linuxfoundation.org> References: <20220815180337.130757997@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