Received: by 2002:a6b:fb09:0:0:0:0:0 with SMTP id h9csp617561iog; Mon, 13 Jun 2022 09:14:29 -0700 (PDT) X-Google-Smtp-Source: AGRyM1vSdBOc3xMRI7Qm0uMdakqSQwXRAZQaayJORUVnegMX1dBH6Sc1p9YirtRAu58Mk/A879Jn X-Received: by 2002:a17:902:c40a:b0:163:d38e:3049 with SMTP id k10-20020a170902c40a00b00163d38e3049mr374740plk.87.1655136869458; Mon, 13 Jun 2022 09:14:29 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1655136869; cv=none; d=google.com; s=arc-20160816; b=uuSphZ4V0Ot6VRMVvntYjF/Q2pqAua6TEHWBVTYv7wGFxTi9LExn+PgSLdoFKVPpIW EH1R/dvomPfE9n3yWhk/qu+hZ10HrtZ8MMFo9G48LZPC+vBrAKFH8uiNXGS6KzUvIQiC MkjzWa4k8qjWN12BzPYs92OtQPsH3+0o7hIvNq98YwAiB170MCKdyy766bA8gFTJn1bJ CcdxPONnoR9N2JE360xqZoKoiZDXj3Wj4efuoEFYarpKQ9jqULlf8h4E467eFsVfJajF L2/QiwklzsYPqslt0HmXDqtTYVnNKIqHuUxg21hKmV5qCocATyFGa4gdZ2PcUNM4ijmF X/Gw== 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=u3l4Nm8i9uESjTlb5LWswQScyLYGZhXmHD6uOr2VAAI=; b=TOgA0qP9vqohKKv5XyWoO0ryl07u+PvdVA/0t4A1NNOMaZ6Ee+rtqPjkdrPmgpdDSm STG8O+Zvz1lAPRGFcQM7GYTHwgl1fE+SD5cbCn0kFpJThO7i082BLBAG40hra9VG8boI E7MNwqTyrtq65kPgbQ1J04HUcT0lsIYSG4N1rM0eiNwmMx63ziy00VQZacC1L+NtMPCk QBp/mbUdioq1JstewLfW974zcJwbDjwF54kVFFhmZAO6J//qS7BYgorirsa4iI/XdD37 8hfw8Y7eve7by7VCYMXC150u5yrAxQQlpXVT0ZUBkB1xGkUZ3rOBJYCUgtyGzNjAlJ8Y X+SA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b="Wy/UvP8b"; 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 x3-20020a170902ec8300b00168a4ef6a67si11980266plg.17.2022.06.13.09.14.16; Mon, 13 Jun 2022 09:14:29 -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="Wy/UvP8b"; 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 S242089AbiFMKRP (ORCPT + 99 others); Mon, 13 Jun 2022 06:17:15 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:60976 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S241612AbiFMKQu (ORCPT ); Mon, 13 Jun 2022 06:16:50 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id CD392DFFC; Mon, 13 Jun 2022 03:15:21 -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 EDD13614BF; Mon, 13 Jun 2022 10:15:16 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 0D265C34114; Mon, 13 Jun 2022 10:15:15 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1655115316; bh=qToVZsXl134a53xo2VcsV0MaOUoIecEvvSYgrba1pOU=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=Wy/UvP8bPL90mdxmV29Rctz50I8wsC2mSfRznpRxB9NNT0xLYU2tHEnEltbPLqvZc 8TxYcTO7iMQ8YgoZ3LBld0bYVIzQNMcVOZa0dKMXxoHewtIgBzwDZOU5UZ1Ua11GOq nqVJYWhgA0vyiFs/8QLo6hcvKwiN6RZ1scwGAuCk= 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 4.9 030/167] ARM: versatile: Add missing of_node_put in dcscb_init Date: Mon, 13 Jun 2022 12:08:24 +0200 Message-Id: <20220613094847.886843985@linuxfoundation.org> X-Mailer: git-send-email 2.36.1 In-Reply-To: <20220613094840.720778945@linuxfoundation.org> References: <20220613094840.720778945@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=-8.3 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: 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 5cedcf572104..3e86cff1d4d3 100644 --- a/arch/arm/mach-vexpress/dcscb.c +++ b/arch/arm/mach-vexpress/dcscb.c @@ -146,6 +146,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