Received: by 2002:a5d:9c59:0:0:0:0:0 with SMTP id 25csp2141026iof; Tue, 7 Jun 2022 21:07:07 -0700 (PDT) X-Google-Smtp-Source: ABdhPJx6zOnSyUpEsRNUW+srFxDisOauxOV0aH+129GSKWjNVyEvcclGK6BI41Z7l0cREuZb1Puf X-Received: by 2002:a17:902:a712:b0:167:74f4:874e with SMTP id w18-20020a170902a71200b0016774f4874emr15251859plq.76.1654661226896; Tue, 07 Jun 2022 21:07:06 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1654661226; cv=none; d=google.com; s=arc-20160816; b=dbYSlgWvqdUYZeQHIJZK6VZJJeLKaMsrcP8HyfVZywJ64DQ6PKYVcUzG/ZDcKvmRjW HA/qQbEtkC0AEaPs7VkvJ/oNvRta/KUImVfYs6YxVM0svJAn/B3hMdTbiHtf2tfxO4qV IPMlm02bRWWkdI3HTV+rYpUY4A538HZ0gBGdJWOO02mcDR8M8orpe+i9mts004DTzIXS /6UTdD+KtBQsRuWLg8WokDzsZ80NKrpQe9C4hRdEo9yHFvRRKNHyBCHGl+vnAEX27HUq DHso2eIEXe8XvnMHdP5yZM0yq0cw0oy0hMqQxAqyUAZ58eE65DitUI/01Ip9RiuZDL+Z 8+5g== 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=W4PssEyQa2haEreW+1wauL4dxcWWHAXKsQVj/dCiT+s=; b=YKoBc527oSbbStAQRDiz62WKBlmFW4fb/HdYmP+f1Z32+WnM7qzCUowsD0CDGimtJI pWJIq75liSVjuFcOFWWGFPwLNbM2sIQTAgHP8ghjYn+Tiov8tw6yCmeNO50wCu7oRdNg APJyn24y5D2p7FMcX+t1TUdWZ2Isvzmnu/cIrurV0D0vM6L5zIcgTjxyxf7Brz0e3N2N oG/uoHoxS3c93raQAFO73IIbyiMeXbh6BhZW2lupMjbEK5hd0kxDdpJQvSYdnK/ldpk1 bPWVV1+oFrrLbpiTGe+D7Pk8ydh1hCG6ps5nJpkGSoClgUQi5695K3+MyA8NQoiLPuov K6qw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=aN0NSciM; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 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 lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [2620:137:e000::1:18]) by mx.google.com with ESMTPS id q2-20020a656a82000000b003fbd727a15asi28992886pgu.670.2022.06.07.21.07.06 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 07 Jun 2022 21:07:06 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) client-ip=2620:137:e000::1:18; Authentication-Results: mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=aN0NSciM; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 06E841821A8; Tue, 7 Jun 2022 20:33:08 -0700 (PDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1385468AbiFGWbb (ORCPT + 99 others); Tue, 7 Jun 2022 18:31:31 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:44718 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1380690AbiFGVQl (ORCPT ); Tue, 7 Jun 2022 17:16:41 -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 69BBC14AF4D; Tue, 7 Jun 2022 11:56:09 -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 E759BB82018; Tue, 7 Jun 2022 18:56:07 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 601E7C34115; Tue, 7 Jun 2022 18:56:06 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1654628166; bh=3bFFMwh7UcBdAXXdvobbtik2xvYHlP3q36CF7S5HcJs=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=aN0NSciMVGOzUS4glk9yVs4ds+7xVm3Uuf21lpzG6AvGF1+3qX/GpEVKFMhY4+MQm 4lO6Z5Re25Ex2BUtR9vBxonxzXg551hHQxguNyBeY1RC3RTvr0jVpQvemE0Mmisrha zX+8DIiHYGBR5Dhd6jd5ux3dlZGe7cYLwVnxSQIw= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Peng Wu , Linus Walleij , Arnd Bergmann , Sasha Levin Subject: [PATCH 5.18 229/879] ARM: versatile: Add missing of_node_put in dcscb_init Date: Tue, 7 Jun 2022 18:55:47 +0200 Message-Id: <20220607165009.500094206@linuxfoundation.org> X-Mailer: git-send-email 2.36.1 In-Reply-To: <20220607165002.659942637@linuxfoundation.org> References: <20220607165002.659942637@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=-3.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,RDNS_NONE,SPF_HELO_NONE,T_SCC_BODY_TEXT_LINE autolearn=unavailable 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: Peng Wu [ Upstream commit 23b44f9c649bbef10b45fa33080cd8b4166800ae ] The device_node pointer is returned by of_find_compatible_node with refcount incremented. We should use of_node_put() to avoid the refcount leak. Signed-off-by: Peng Wu Signed-off-by: Linus Walleij Link: https://lore.kernel.org/r/20220428230356.69418-1-linus.walleij@linaro.org' Signed-off-by: Arnd Bergmann Signed-off-by: Sasha Levin --- arch/arm/mach-vexpress/dcscb.c | 1 + 1 file changed, 1 insertion(+) diff --git a/arch/arm/mach-vexpress/dcscb.c b/arch/arm/mach-vexpress/dcscb.c index a0554d7d04f7..e1adc098f89a 100644 --- a/arch/arm/mach-vexpress/dcscb.c +++ b/arch/arm/mach-vexpress/dcscb.c @@ -144,6 +144,7 @@ static int __init dcscb_init(void) if (!node) return -ENODEV; dcscb_base = of_iomap(node, 0); + of_node_put(node); if (!dcscb_base) return -EADDRNOTAVAIL; cfg = readl_relaxed(dcscb_base + DCS_CFG_R); -- 2.35.1