Received: by 2002:a6b:500f:0:0:0:0:0 with SMTP id e15csp6248181iob; Tue, 10 May 2022 13:56:06 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxq6pOH/c88WpbCOSa2jfTCgovivf4a5kiOKFzyq273zggahmczjm3nP0/5Q30cJhW+QJkD X-Received: by 2002:a17:907:c22:b0:6f4:2cb6:7ba9 with SMTP id ga34-20020a1709070c2200b006f42cb67ba9mr21969774ejc.29.1652216166736; Tue, 10 May 2022 13:56:06 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1652216166; cv=none; d=google.com; s=arc-20160816; b=BqoXiS9abz50y7Dh+0FY0YgZGLoCyCmod70CYuBCxADNTn/Ug3Vfohu2x3vGqRxoBA ON81klGif6tlyjLdFojmEs3VZUteaJ8TfqstbMoJxHP4dexquWlvf95eg3ioRNovp85N GKS7wIOkYfKrBfTIfREieBQAR4/aKWj3J+FCxPDqdp8oBM9Fcn7j3JBcezGwk0nWD+An wSpCCQyS70mMVzfRSOREjj1X9y0yCauKUKJZnZRShpZ4lzI73KY4zMjrQNb6Qi6EHliC ovWM1p3W8ADIFuci4iT4UTHS81GbiQ8j3jyXGeiKivK7SeDRSmftJhxyuYvGjAYGi+Wm D2qg== 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=SRby9xUzCRILkzM9IJj9eY7x8AEacKVKdnND+KxEy5U=; b=H4i6X+rnlshZMtkdc21tcx/MtwFBa50jahZoLU3D1+DVT8T7vk2osTIlBoJf7yaBXr Qk3OLXCAk8LsqJbcl3i9Aqi8Siht4y0ffp+FsddvKDjq//QgkAl1IeijyaZPDRSogVDp n/LZcE/vZXZ5LghJ/mB2dieRSMZuJxFzqeACKta82OEJ+QhljP5tlG3SwVOD5GjVkcRM vZ8LRVjXLs93ej/dgqK5tE6xXYpRtI8jPPjFht1WIJqskFQSBzSmPoztQZoo8ojbY9xp auiBnUdqrVnogxZ5G5elqzDDxuo4VABA8v1B+3U63co8YKkvTTTk7WGmZJh3pB9iNpH0 8p2A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=RAHxRnG4; 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 x18-20020aa7d392000000b004259e7818b8si183583edq.328.2022.05.10.13.55.43; Tue, 10 May 2022 13:56:06 -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=RAHxRnG4; 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 S238897AbiEJN2e (ORCPT + 99 others); Tue, 10 May 2022 09:28:34 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:45968 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S243231AbiEJNVk (ORCPT ); Tue, 10 May 2022 09:21:40 -0400 Received: from ams.source.kernel.org (ams.source.kernel.org [145.40.68.75]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id A16DF2C3345; Tue, 10 May 2022 06:15:22 -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 90E66B81DA6; Tue, 10 May 2022 13:15:05 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id EC2EEC385A6; Tue, 10 May 2022 13:15:03 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1652188504; bh=rBjHofO1WNs/cYxljno5UdrSN3KrNADHJN7VZG+ibug=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=RAHxRnG4wkEDLVkRZwvDGbtqyTol01tUXpRAq45vnLqH8ZzwHtrJKjmOhIkOc3RBa JrLbFEM/oaOzjZXY96MLOVOiBU7sRPLBehPGqKKDPd6gCODv2KAtwxdOhR3slB2QTT nGD5veBV7ijpYt14uKYHePOW2YG7BlfFz5dpd7IU= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Miaoqian Lin , Tony Lindgren , Sasha Levin Subject: [PATCH 4.14 29/78] ARM: OMAP2+: Fix refcount leak in omap_gic_of_init Date: Tue, 10 May 2022 15:07:15 +0200 Message-Id: <20220510130733.398424783@linuxfoundation.org> X-Mailer: git-send-email 2.36.1 In-Reply-To: <20220510130732.522479698@linuxfoundation.org> References: <20220510130732.522479698@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-7.7 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,URIBL_BLOCKED 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 0f83e6b4161617014017a694888dd8743f46f071 ] The of_find_compatible_node() function returns a node pointer with refcount incremented, We should use of_node_put() on it when done Add the missing of_node_put() to release the refcount. Fixes: fd1c07861491 ("ARM: OMAP4: Fix the init code to have OMAP4460 errata available in DT build") Signed-off-by: Miaoqian Lin Message-Id: <20220309104302.18398-1-linmq006@gmail.com> Signed-off-by: Tony Lindgren Signed-off-by: Sasha Levin --- arch/arm/mach-omap2/omap4-common.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/arch/arm/mach-omap2/omap4-common.c b/arch/arm/mach-omap2/omap4-common.c index e5dcbda20129..7fff67ea7bcd 100644 --- a/arch/arm/mach-omap2/omap4-common.c +++ b/arch/arm/mach-omap2/omap4-common.c @@ -342,10 +342,12 @@ void __init omap_gic_of_init(void) np = of_find_compatible_node(NULL, NULL, "arm,cortex-a9-gic"); gic_dist_base_addr = of_iomap(np, 0); + of_node_put(np); WARN_ON(!gic_dist_base_addr); np = of_find_compatible_node(NULL, NULL, "arm,cortex-a9-twd-timer"); twd_base = of_iomap(np, 0); + of_node_put(np); WARN_ON(!twd_base); skip_errata_init: -- 2.35.1