From patchwork Sun Apr 25 17:49:45 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Krzysztof Kozlowski X-Patchwork-Id: 12223453 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-17.0 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER, INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED, USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 1B8BBC433ED for ; Sun, 25 Apr 2021 17:51:49 +0000 (UTC) Received: from desiato.infradead.org (desiato.infradead.org [90.155.92.199]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 8E996610C8 for ; Sun, 25 Apr 2021 17:51:48 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 8E996610C8 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=canonical.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=desiato.20200630; 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:To:From: Reply-To:Cc:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References: List-Owner; bh=eE1obABJ1Nj2Pz9ctLAXZxrkIJCX3+gCbfKLeprZn0E=; b=VilPkh3/v8AnK7 7d7J7aYM/6/kIgSCSDhkSALr9hyOHzhrIyeX6vlmsWmzUYDwUBuBDnCTyV8yhnXm0/xOg9O4YR9Bg rBNu2o7B4r11jqBKyTnUKwFWJth5LXFbFMCCRCkgb+Efdyo8X69LerD1nn49RbAs5wLyz2FFlYE9J 1mx58jlD+aMIO0mEv7QznNxFSnTdM5/ACr81K1rYLt+bMOjL4R+1h8eb/gU4XfPChBwDKLKZ7jB9h uqcLu0wDtiuVYc+yun7wxb/NqJVwJ7//P02vDdAL2sG7FHJ0fT/A06u2uAUn/p2TyJ+js0Vv1sI0F P4zZVotfTwHdm/eIi+Ew==; Received: from localhost ([::1] helo=desiato.infradead.org) by desiato.infradead.org with esmtp (Exim 4.94 #2 (Red Hat Linux)) id 1laitI-0062Bw-09; Sun, 25 Apr 2021 17:49:56 +0000 Received: from bombadil.infradead.org ([2607:7c80:54:e::133]) by desiato.infradead.org with esmtps (Exim 4.94 #2 (Red Hat Linux)) id 1laitE-0062BN-FT for linux-arm-kernel@desiato.infradead.org; Sun, 25 Apr 2021 17:49:52 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=bombadil.20210309; h=Content-Transfer-Encoding: MIME-Version:Message-Id:Date:Subject:To:From:Sender:Reply-To:Cc:Content-Type: Content-ID:Content-Description:In-Reply-To:References; bh=RBjEAtJQftD+dVBcJH/vI5ONKidJRREyztVu/ffD0/8=; b=XimhKUQ5iLqDXRyNZJ9pq+2QGe Cvy3wtQ1YTvqttvNKRpt9hmsAOt7/YjzgmWA0th5/B339uHP+bZzlD+iHN9Fj0AuWwA5OojQySFxQ 3woh0PiYT71UspAIR9H5ktPfzlulBh2dDnryDu8spgSbkk9vrUnZnyl+3acT49bIkcmR/pmaKEzNk BhKXeoXALLEWV+d6m55hOe324pSYF7umRpbRCCteoD/dkY+BQ904xdaRparZVjHG94u4m+Ikl+rEz ogIrEvfBbU6Ut9+tS9ATZfb+c1kEz0pNNbvW5S/UEfLIMi+UZldSAHjLdTgie5skrhiC7O4tT4fxM Xt7jJG0Q==; Received: from youngberry.canonical.com ([91.189.89.112]) by bombadil.infradead.org with esmtps (Exim 4.94 #2 (Red Hat Linux)) id 1laitC-00FXH3-0Q for linux-arm-kernel@lists.infradead.org; Sun, 25 Apr 2021 17:49:51 +0000 Received: from mail-ed1-f71.google.com ([209.85.208.71]) by youngberry.canonical.com with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.86_2) (envelope-from ) id 1laitA-0005Hi-EA for linux-arm-kernel@lists.infradead.org; Sun, 25 Apr 2021 17:49:48 +0000 Received: by mail-ed1-f71.google.com with SMTP id i2-20020a0564020542b02903875c5e7a00so2313297edx.6 for ; Sun, 25 Apr 2021 10:49:48 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:subject:date:message-id:mime-version :content-transfer-encoding; bh=RBjEAtJQftD+dVBcJH/vI5ONKidJRREyztVu/ffD0/8=; b=Eedqzta8ruz0e48Rzlhcy1X+xYryhBne5shzcBV9t4lGwlg8CbORcS4laPk3hzigmY uwHYZAm7YYXxSL75mNdDSd9Q/GeNcmRmoHFhhXNvp6rjQG0vYdP2f6cFonQNXe8NndRK U1rMh/3tyanyFPgbpLr09tJ7UHRIFrqpZL6Jc/u6aov9toCmWCNmMTmw/A/Kwd5v8LoP JdFtGWbyqlEKskGkSwbkcNYv4WOKCMujyvkLrUZT935CJeKiE1MfXpvQ4p7UDeRUMU5y OwVC/hoVYGhEP2bXTdS9gGvKSuMueK52BksgCB2+zTP1vMYoJxc0KJnj7CaXOxNNPs+V cnCA== X-Gm-Message-State: AOAM533hs9s8eEFBOYCdJJOlGI0zajFZpsDRVzcizPQewuP4GA5f0kSv 6nUE0jTwvsrU1WdGAOHZcx2v2E9529Uo+ZxH57q2+eVhQeEn/3Ot3KmT587aF5R678azpzFJn9g IW4yaBJJg5NHn5rCpGQzlKuAmh1tP5i5Ou/Io/rXmwEHDJD0osy7Y X-Received: by 2002:a17:906:38c5:: with SMTP id r5mr14085227ejd.230.1619372988161; Sun, 25 Apr 2021 10:49:48 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyxIa+fvr/8tH3+GL4vr6HdZUUJF//xEt4ORa/3i/PjDfkoJ3qcmGmy6Th5L2m2eXQP7EgPhw== X-Received: by 2002:a17:906:38c5:: with SMTP id r5mr14085217ejd.230.1619372988033; Sun, 25 Apr 2021 10:49:48 -0700 (PDT) Received: from localhost.localdomain (xdsl-188-155-180-75.adslplus.ch. [188.155.180.75]) by smtp.gmail.com with ESMTPSA id ca1sm12113585edb.76.2021.04.25.10.49.47 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 25 Apr 2021 10:49:47 -0700 (PDT) From: Krzysztof Kozlowski To: Krzysztof Kozlowski , Arnd Bergmann , linux-arm-kernel@lists.infradead.org, linux-samsung-soc@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH] ARM: exynos: add missing of_node_put for loop iteration Date: Sun, 25 Apr 2021 19:49:45 +0200 Message-Id: <20210425174945.164612-1-krzysztof.kozlowski@canonical.com> X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210425_104950_200599_DB9EB0F5 X-CRM114-Status: GOOD ( 10.81 ) 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: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org Early exits from for_each_compatible_node() should decrement the node reference counter. Reported by Coccinelle: arch/arm/mach-exynos/exynos.c:52:1-25: WARNING: Function "for_each_compatible_node" should have of_node_put() before break around line 58. Fixes: b3205dea8fbf ("ARM: EXYNOS: Map SYSRAM through generic DT bindings") Signed-off-by: Krzysztof Kozlowski Acked-by: Arnd Bergmann --- arch/arm/mach-exynos/exynos.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/arch/arm/mach-exynos/exynos.c b/arch/arm/mach-exynos/exynos.c index 25b01da4771b..8b48326be9fd 100644 --- a/arch/arm/mach-exynos/exynos.c +++ b/arch/arm/mach-exynos/exynos.c @@ -55,6 +55,7 @@ void __init exynos_sysram_init(void) sysram_base_addr = of_iomap(node, 0); sysram_base_phys = of_translate_address(node, of_get_address(node, 0, NULL, NULL)); + of_node_put(node); break; } @@ -62,6 +63,7 @@ void __init exynos_sysram_init(void) if (!of_device_is_available(node)) continue; sysram_ns_base_addr = of_iomap(node, 0); + of_node_put(node); break; } }