From patchwork Fri Apr 23 10:18:15 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Krzysztof Kozlowski X-Patchwork-Id: 12220065 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=-16.8 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 3FC33C433B4 for ; Fri, 23 Apr 2021 10:20:23 +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 A18B06144D for ; Fri, 23 Apr 2021 10:20:22 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org A18B06144D 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:References:In-Reply-To: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:List-Owner; bh=3v5fXVreaFJzXntLbKvmponRjMbEgWCkdXdHpdLt2qc=; b=mFpezzbIzhL8VmSexi7Kt5b5t Jd31AtUVSFsR4kjWoyQIxjS+EEIjzJEz9e6ga4AfPCf1ZywE5MHiH4nIs09cNlQuURojep7V3GuEQ u6sXO3UcspA+JB4xKYNNaQEgWuvmPB9utmaI6dHB1JQw7MJao/ScczZhgPdNbJB+JtJIaWcIJUKEP eSHHKxFb5+IZ2FnUhoB1QOVGfY5MlgIcOMOpMSrPvIUaWV3USZBdhE84VbVK4I217G5zg2f800k6c XXwid5cQSvDEYUM96eAooCNySHgDN8mLNEognw5o4xBCwJFRkak/d52Dl7dCOsshIT7H9ATUyUlMD lt3wVBFbA==; Received: from localhost ([::1] helo=desiato.infradead.org) by desiato.infradead.org with esmtp (Exim 4.94 #2 (Red Hat Linux)) id 1lZstH-001IIA-Ls; Fri, 23 Apr 2021 10:18:27 +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 1lZstD-001IHt-Tr for linux-arm-kernel@desiato.infradead.org; Fri, 23 Apr 2021 10:18:24 +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:References:In-Reply-To:Message-Id:Date:Subject:To:From:Sender: Reply-To:Cc:Content-Type:Content-ID:Content-Description; bh=EC3zoWq2BZfFb/EWRvBNqc9bpLHCgYUaPIXnRPSJVLg=; b=r+J7SQ66LQDzgBZGgaJPII9EWg AgOyNsXABdWV0cM4DmLef4tZj5yGH3fE4K8kgzxY6owo7kB9zWhaxN5yEu9F+vTWoHFPoTQk6XYCh +6B9LOmy2XfNtWZEzGeS8ENZ8wMAoeQVi6RX6BTAGZfZ9VvxAHmNolbME9n0rye7RVUKbpFM4H3ng WICUSWkWNv8Jb84a/qAYUkzcdAbCdp5O3UCeNw/T4LHCqxN3vS95VG+bLl14B9Su0AaJ0xeFkwXZm n/7+G6F2DwOe1mqPIj2VLqioHFMyWSQ1gflS/Bfb1fMn7jRhDsQKL0exYVbL0Mo2F14+gJ9sfGICr fpTUxbNg==; Received: from youngberry.canonical.com ([91.189.89.112]) by bombadil.infradead.org with esmtps (Exim 4.94 #2 (Red Hat Linux)) id 1lZstB-00EK15-32 for linux-arm-kernel@lists.infradead.org; Fri, 23 Apr 2021 10:18:22 +0000 Received: from mail-wm1-f69.google.com ([209.85.128.69]) by youngberry.canonical.com with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.86_2) (envelope-from ) id 1lZst9-0001b9-An for linux-arm-kernel@lists.infradead.org; Fri, 23 Apr 2021 10:18:19 +0000 Received: by mail-wm1-f69.google.com with SMTP id a71-20020a1c984a0000b029013841a43c3dso514425wme.3 for ; Fri, 23 Apr 2021 03:18:19 -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:in-reply-to :references:mime-version:content-transfer-encoding; bh=EC3zoWq2BZfFb/EWRvBNqc9bpLHCgYUaPIXnRPSJVLg=; b=SiOTyrcRwll4dMPPneXe5UBsSeb52Fyvnb5YT7iEDKlbp9s5DtkAty2nZWy0Sxrrkn gXWKFrnrNAlXEBHnqD/4/jqRD7+qyBuoTOEF445OGohT7zMNFA6+2GcCCJw3ANmXOiQ9 I9eIwZa0kU+IFa5oFgWhwAcf8LGyggMz0L+c8VOi3DyXbhPrr8OwadyKYHlbZ0Dg00Vz X7/kbHxlb6blcfhwJ21//af862xSSevX+ACwdivbuS8rLkhb7JdGEsaOJWUp8zUDUdS5 RhyQRe1a/QXro8oFnwiX01dQEY2CxK6q1K+CVSXQH5GFkwbNRmIHP+/jN7e0KJKQcik1 QBbg== X-Gm-Message-State: AOAM530DVE8WV55BGNUV3Q7ve5uS6E8z6JC+s4E0cOSmb6ktURcc2RP1 EGZS4xCUarbvZjQniyp8lE6HDL6HILPcJNc7jx4x5YalfFI87gYMVi9kQ3vNmt65MxcSGCDjwtg qRZ1MhJDNDUroNOo2QaLS0PRAVoK2gm/IePmfe2ctCMFUoGUu+dzu X-Received: by 2002:a5d:6ac6:: with SMTP id u6mr3767673wrw.290.1619173099135; Fri, 23 Apr 2021 03:18:19 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwF9sI9bCBwQSREZbDeBLDvxvweCTOZ8qI9QcsoUrGVo9CdTEpRonVxU+F0lh3KuSjDfn1b0A== X-Received: by 2002:a5d:6ac6:: with SMTP id u6mr3767654wrw.290.1619173099028; Fri, 23 Apr 2021 03:18:19 -0700 (PDT) Received: from localhost.localdomain (xdsl-188-155-180-75.adslplus.ch. [188.155.180.75]) by smtp.gmail.com with ESMTPSA id k22sm9011546wrh.5.2021.04.23.03.18.18 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 23 Apr 2021 03:18:18 -0700 (PDT) From: Krzysztof Kozlowski To: Krzysztof Kozlowski , Nicolas Ferre , Alexandre Belloni , Ludovic Desroches , Maxime Coquelin , Alexandre Torgue , Christophe Kerello , Miquel Raynal , Boris Brezillon , linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-stm32@st-md-mailman.stormreply.com Subject: [PATCH 2/2] memory: atmel-ebi: add missing of_node_put for loop iteration Date: Fri, 23 Apr 2021 12:18:15 +0200 Message-Id: <20210423101815.119341-2-krzysztof.kozlowski@canonical.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20210423101815.119341-1-krzysztof.kozlowski@canonical.com> References: <20210423101815.119341-1-krzysztof.kozlowski@canonical.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210423_031821_287043_1956D64B X-CRM114-Status: GOOD ( 13.21 ) 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_available_child_of_node() should decrement the node reference counter. Reported by Coccinelle: drivers/memory/atmel-ebi.c:593:1-33: WARNING: Function "for_each_available_child_of_node" should have of_node_put() before return around line 604. Fixes: 6a4ec4cd0888 ("memory: add Atmel EBI (External Bus Interface) driver") Signed-off-by: Krzysztof Kozlowski --- drivers/memory/atmel-ebi.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/drivers/memory/atmel-ebi.c b/drivers/memory/atmel-ebi.c index 14386d0b5f57..c267283b01fd 100644 --- a/drivers/memory/atmel-ebi.c +++ b/drivers/memory/atmel-ebi.c @@ -600,8 +600,10 @@ static int atmel_ebi_probe(struct platform_device *pdev) child); ret = atmel_ebi_dev_disable(ebi, child); - if (ret) + if (ret) { + of_node_put(child); return ret; + } } }