From patchwork Thu Feb 25 08:54:50 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Yang Li X-Patchwork-Id: 12103637 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,UNPARSEABLE_RELAY, 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 A89E1C433E0 for ; Thu, 25 Feb 2021 08:56:10 +0000 (UTC) Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) (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 2B92D64EF1 for ; Thu, 25 Feb 2021 08:56:10 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 2B92D64EF1 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=linux.alibaba.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=merlin.20170209; h=Sender:Content-Transfer-Encoding: Content-Type:MIME-Version:Cc:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:Message-Id:Date:Subject: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=rylFTZvB2gOF1R4ujv4VA+p9jU/HtfJzTpYcY8TUuug=; b=M0OUIAK0eGX8msr8Srrr8wdTzv k3TkddRDRZlGpQtAUMYqiWW5M2rEU1oEr6f/L/4bMnG/0Fs64VqCVUZ/vk/f/Jb/B7nQ/mMCAqwUY QG24qKGx6/NmSXX5jbx5E5ScOGwrU/TPXA6F9NXnjjmp6mPaPQ1HunoD8gOvVvCyjKt3IDwbF4meW E4tjevA/UQ3UvAS3m5PD8d++VjgzJZM/ztK9QN7GJiSz7UG410WenUKOUd1TWN9V0xj8Oi70qFn1R t+F/Rha39gYxjT7rXDv9+UcuZPlg/OQZsacLi1p/l1wuSs1JxiXh0gP3ks2xvpdHfZ1ksra+F4ISi RgBm26mw==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1lFCQH-0002m2-1b; Thu, 25 Feb 2021 08:55:01 +0000 Received: from out30-130.freemail.mail.aliyun.com ([115.124.30.130]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1lFCQE-0002l6-Qa for linux-arm-kernel@lists.infradead.org; Thu, 25 Feb 2021 08:54:59 +0000 X-Alimail-AntiSpam: AC=PASS; BC=-1|-1; BR=01201311R661e4; CH=green; DM=||false|; DS=||; FP=0|-1|-1|-1|0|-1|-1|-1; HT=e01e04426; MF=yang.lee@linux.alibaba.com; NM=1; PH=DS; RN=8; SR=0; TI=SMTPD_---0UPX1XWK_1614243292; Received: from j63c13417.sqa.eu95.tbsite.net(mailfrom:yang.lee@linux.alibaba.com fp:SMTPD_---0UPX1XWK_1614243292) by smtp.aliyun-inc.com(127.0.0.1); Thu, 25 Feb 2021 16:54:52 +0800 From: Yang Li To: bcousson@baylibre.com Subject: [PATCH] ARM: OMAP2+: add missing call to of_node_put() Date: Thu, 25 Feb 2021 16:54:50 +0800 Message-Id: <1614243290-47105-1-git-send-email-yang.lee@linux.alibaba.com> X-Mailer: git-send-email 1.8.3.1 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210225_035459_071646_40041863 X-CRM114-Status: GOOD ( 10.26 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: paul@pwsan.com, tony@atomide.com, linux@armlinux.org.uk, linux-kernel@vger.kernel.org, Yang Li , linux-omap@vger.kernel.org, linux-arm-kernel@lists.infradead.org MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org In one of the error paths of the for_each_child_of_node() loop, add missing call to of_node_put(). Fix the following coccicheck warning: ./arch/arm/mach-omap2/omap_hwmod.c:2132:1-23: WARNING: Function "for_each_child_of_node" should have of_node_put() before return around line 2140. Reported-by: Abaci Robot Signed-off-by: Yang Li --- arch/arm/mach-omap2/omap_hwmod.c | 1 + 1 file changed, 1 insertion(+) diff --git a/arch/arm/mach-omap2/omap_hwmod.c b/arch/arm/mach-omap2/omap_hwmod.c index 2310cd5..007e91e 100644 --- a/arch/arm/mach-omap2/omap_hwmod.c +++ b/arch/arm/mach-omap2/omap_hwmod.c @@ -2137,6 +2137,7 @@ static int of_dev_hwmod_lookup(struct device_node *np, if (res == 0) { *found = fc; *index = i; + of_node_put(np0); return 0; } }