From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 8333BC43334 for ; Mon, 13 Jun 2022 10:17:28 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S242093AbiFMKRS (ORCPT ); Mon, 13 Jun 2022 06:17:18 -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 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