Received: by 2002:a05:6358:4e97:b0:b3:742d:4702 with SMTP id ce23csp2924763rwb; Mon, 15 Aug 2022 14:09:44 -0700 (PDT) X-Google-Smtp-Source: AA6agR6hxbIdOOrE/r0yObi2WJhqm4f6YN+WExdzhinUGZIoj07pZDTwXti539OHCs7A2zYdTjOh X-Received: by 2002:a17:907:75e8:b0:730:ccd3:2683 with SMTP id jz8-20020a17090775e800b00730ccd32683mr11552275ejc.329.1660597784482; Mon, 15 Aug 2022 14:09:44 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1660597784; cv=none; d=google.com; s=arc-20160816; b=eaXgXPcj+WaKfex/f6YHNLbd8q3cBTfUF3sI9yLsyicZp0pLbWf/D++sKUshBbFyXj G0ogG3L231GtaAJOkZ2CmqQlMiUqzaBVC9PxOxp29lc+b7slPjzexpFugcWXgfioAF+M ZQssE6dPOZXk9/djYItUJ6dhTX7XFzeuRnQtYle0MEVjRxfWfiBq/YEB4jtBs2yG2AaS xI0nle9MY5RXiX/N5nvOwu8Bhr/5wTUWvKrSK0hUhIwvUuafWy161Q7oACzEQSh7F9CC 19xp6mS44cXpDhoeaFmdi5zHRiggfgL33rmFbRBALZnkyCattuFqH8/DTgPzAkTrtWJS sPJA== 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=xQgfNZnO7R60diYBPfk87Ncvb/cZ8HwiGfaRbR4zIaCom/TXp8bV1qp3e0+1+sUIdl iJ2ttDHcrx/e2GPBmAMqYwwxfjy4khAvgGQ0eT6Slu5QKvrYJPmOHYSPRxyFmmUBtKs+ k4XhxKX3CcYw47wNo1d4iRVhwrzhk3x596gVXAl/xi5EjVwBSbDTte6PnRFRc6xPnQzh OHcLUvwcQ6nxAwwSVY9F4oodfj3bZZcnmngl9E7fUqgxH+R7Klwj68O5zqCGtr0WBpEO ivvq3ZZjsB9Z+Y41cLkfcxTGidYKZl3ygTONdkqGlNo+SqGro1xttcfu9fMKWj7IczJe 3XSA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b="bgZZRe9/"; 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 ft16-20020a170907801000b0072ed0d06c0csi7065975ejc.411.2022.08.15.14.09.18; Mon, 15 Aug 2022 14:09:44 -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="bgZZRe9/"; 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 S1348215AbiHOUcR (ORCPT + 99 others); Mon, 15 Aug 2022 16:32:17 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:57014 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1347763AbiHOU0f (ORCPT ); Mon, 15 Aug 2022 16:26:35 -0400 Received: from ams.source.kernel.org (ams.source.kernel.org [IPv6:2604:1380:4601:e00::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 5C2079DB76; Mon, 15 Aug 2022 12:03:38 -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 E322FB81106; Mon, 15 Aug 2022 19:03:34 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id EBAEDC433D7; Mon, 15 Aug 2022 19:03:32 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1660590213; bh=YhgF2yt0u3VyqWuFgGE9+OCvXB5d0Chiy9PsctpcyxA=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=bgZZRe9/m4bqmTRIwVi7p+nDO25+fr1qmKo8koR7GntlJxTWFtvyCXUKXIYPYlTj3 Q9hjHVl/ZyjnGSo18titpht8iFcIuzCuEkaEOduWjV20XoSUEPACu1IBaNiRRp3RfI aqg7LZcgJM/tzHGZzLQeOScMTsPD8GxFzbgShgRY= 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.18 0188/1095] meson-mx-socinfo: Fix refcount leak in meson_mx_socinfo_init Date: Mon, 15 Aug 2022 19:53:07 +0200 Message-Id: <20220815180437.418910785@linuxfoundation.org> X-Mailer: git-send-email 2.37.2 In-Reply-To: <20220815180429.240518113@linuxfoundation.org> References: <20220815180429.240518113@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