Received: by 2002:a05:6a10:1287:0:0:0:0 with SMTP id d7csp3866663pxv; Mon, 19 Jul 2021 10:38:06 -0700 (PDT) X-Google-Smtp-Source: ABdhPJz1rSRCms8bzfIVJfS3bdQ0l8yKD59vIO3402xX98z5M7AWNLsIJD3y/BMnkCF1KlPed1lI X-Received: by 2002:a17:906:3616:: with SMTP id q22mr27673775ejb.276.1626716286528; Mon, 19 Jul 2021 10:38:06 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1626716286; cv=none; d=google.com; s=arc-20160816; b=YL1QHSqRj2v7TbXGWh6ZAWw/wh2eBIB8n3nSrEg8Z7t1Vjjj745YLfJyfhBg3oJauQ ZT//3CGD2oCJ+pecppgoQ6KLvMiX/DQXJjKzeGIm0LXDo8qVkMJEHVpatOOCZzwc4LVn 6Sbihp1U7Ssc2T1Xdvi8JVCAs/anE+6rDmxe6Sh68D7tVNP84kCOs9Sf7BYH0faTsz5m q5lnWsDyf3IU07pXuhkGBRnpPrnYowkmE6jVthI+xZutOVjUThcq8WcmnDA6d/6sZwNJ 89TvOixk6m1Sr2LVOmmkDQXHgo/QSNdtA1RIVQSmq0DfuBmshGCRZMrVGiXKLaNc5p/i EYWQ== 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=R81gqBzZ60c+RjKlfBj0cXivQ3wEE5zgtdhGkZZWmWs=; b=0lBuadkLVEZuu8kRp7M9ApVFqpdXGDWsAd1qlK5+FlWtW3PBGcFmneUbE//7PY3iPn yO5LYwMiCoH5jP5O42G7gy7vfemHHphr/g5/k/VTqEtGS1nfuLoSL/oIIFXv4WNZLJ1g AHscdvrGAooB0ToTj18MdduFU3t/TSSJckJDRGU6KZnV88bF/jZOPPin5pydXP1bLrhz 5ayxjMPB673dhMdSkIltu1BgYamD5SoJZSep0Dm35lTDmR9H3KKSYzsh8lhqItFkik07 Ql37nTSxEPv+k2msmbP2LjMHWCvzODwZ4rFp/J12TBDpaLmJYY/LbFvAS7FF80VCt7oZ lvuw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=ndYDWw1s; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 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 vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id ci4si6629410ejc.618.2021.07.19.10.37.43; Mon, 19 Jul 2021 10:38:06 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=ndYDWw1s; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 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 S1357782AbhGSQwS (ORCPT + 99 others); Mon, 19 Jul 2021 12:52:18 -0400 Received: from mail.kernel.org ([198.145.29.99]:38168 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1347862AbhGSPWL (ORCPT ); Mon, 19 Jul 2021 11:22:11 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id 97F7D613FB; Mon, 19 Jul 2021 15:59:45 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1626710386; bh=jgg0uQosO6yAVi5yQtfEpZjl7nko8NRs6L7+JDAfTC4=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=ndYDWw1s1fxCg4YyAHUjpWpFqG/wTxyuwz10S0SQfj15Ae0R4Z0lJXABsIv8Dq5vB NK749pu2uer360Q91gYux4cUXWH+Zrh8H0QiiKHlqyirv9CAK0/VKcNMAAl/JCr7v+ 0VIvYILmcqlIqPLIus11DFF9Dk7ZNBQN5wenquJk= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Krzysztof Kozlowski , Sasha Levin Subject: [PATCH 5.10 195/243] memory: atmel-ebi: add missing of_node_put for loop iteration Date: Mon, 19 Jul 2021 16:53:44 +0200 Message-Id: <20210719144947.213594437@linuxfoundation.org> X-Mailer: git-send-email 2.32.0 In-Reply-To: <20210719144940.904087935@linuxfoundation.org> References: <20210719144940.904087935@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: Krzysztof Kozlowski [ Upstream commit 907c5bbb514a4676160e79764522fff56ce3448e ] 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 Link: https://lore.kernel.org/r/20210423101815.119341-2-krzysztof.kozlowski@canonical.com Signed-off-by: Sasha Levin --- 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; + } } } -- 2.30.2