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 bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id C5FACC433F5 for ; Mon, 25 Apr 2022 08:20:20 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:Message-ID:Date:Subject:CC :To:From:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References: List-Owner; bh=ZHfzmSwJFrDH4zGxFvnrJKM6RHvxGLsCEtl/1gp/YDI=; b=pfqmxiSipRACzO PwY0m8t2Nx+94YBqwVbY2wDn/7cbMN62hbaDz0xKNMrQdFLKQNOMZIO6wlr58cxE9lsqOh9GLH1Co VsdhK05Bw3z5pSiwLWSxDYXYrI2iWpLJWIS6Zwq0dhp0tXe28ZuCZ+KMzV4oG62RZpeCdRsAgNSAx xTNx9FEG3HcOzx2t3lH8QkxERX3OTcNHFEnDqvDlj8vy90ddN3EhTEg4+vB9Xk5XxgYDX7F9EnZPW 567nZnsdYi0L8GZU0MIo+ANX2s6yX8BHayrCk7x6VqgrSlfMGtir0/cSBZqQO6SR63uFPY0TkCci9 iAJTsRF67qOVkJXsJrOQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1nitwF-008jVe-7u; Mon, 25 Apr 2022 08:19:19 +0000 Received: from desiato.infradead.org ([2001:8b0:10b:1:d65d:64ff:fe57:4e05]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1nitwB-008jVU-T7 for linux-arm-kernel@bombadil.infradead.org; Mon, 25 Apr 2022 08:19:16 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=desiato.20200630; h=Content-Type:MIME-Version:Message-ID: Date:Subject:CC:To:From:Sender:Reply-To:Content-Transfer-Encoding:Content-ID: Content-Description:In-Reply-To:References; bh=/KXn+CGrxKxV85+CATU3u9oXd0pwkFAQiw6dD0nuWDw=; b=GuZH8K1SxUJAeX3f12JUFJr7pg SIBiROVbhxX53xkzPXo5eSyFfpWLR+iZgBWVoWThILeGBsq4mQD/UrtELHfbTmk1DrpxBD4zWOE8d HPXhj7vhmGp1zQtoUVQOPjaYh2SPInQ7rWTs9TfAhw2b/kQP3/jGyJAUvfEeAbbO941W+kDZ/cwre qux/evd6aDtkQHy2jnaeN1NI2E3DVP7vgJJZmUXgwpe1ezrrjK0f8bDUR8Y7GCgh39iTm3MUdF7Ri 5j2gI+AR+IJX4GeLOUGx15K9ijp6MNvnc0z79hYkBO7Vh11H/VIUJk/Fq96HjIZH5J9x8uJfIsaPu Ypc3spHg==; Received: from szxga03-in.huawei.com ([45.249.212.189]) by desiato.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1nitw7-008UvU-CI for linux-arm-kernel@lists.infradead.org; Mon, 25 Apr 2022 08:19:13 +0000 Received: from kwepemi500023.china.huawei.com (unknown [172.30.72.54]) by szxga03-in.huawei.com (SkyGuard) with ESMTP id 4KmyTB2b9tzCs42; Mon, 25 Apr 2022 16:13:50 +0800 (CST) Received: from huawei.com (10.175.112.208) by kwepemi500023.china.huawei.com (7.221.188.76) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2375.24; Mon, 25 Apr 2022 16:18:20 +0800 From: Peng Wu To: , CC: , , , , Peng Wu Subject: [PATCH -next] ARM: versatile: Add missing of_node_put in dcscb_init Date: Mon, 25 Apr 2022 08:14:16 +0000 Message-ID: <20220425081416.22836-1-wupeng58@huawei.com> X-Mailer: git-send-email 2.17.1 MIME-Version: 1.0 X-Originating-IP: [10.175.112.208] X-ClientProxiedBy: dggems703-chm.china.huawei.com (10.3.19.180) To kwepemi500023.china.huawei.com (7.221.188.76) X-CFilter-Loop: Reflected X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220425_091912_046444_09611421 X-CRM114-Status: UNSURE ( 8.15 ) X-CRM114-Notice: Please train this message. X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org 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 --- arch/arm/mach-versatile/dcscb.c | 1 + 1 file changed, 1 insertion(+) diff --git a/arch/arm/mach-versatile/dcscb.c b/arch/arm/mach-versatile/dcscb.c index 866270e7f271..d8797350996d 100644 --- a/arch/arm/mach-versatile/dcscb.c +++ b/arch/arm/mach-versatile/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.17.1 _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel