From patchwork Fri Feb 26 01:28:40 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Yang Li X-Patchwork-Id: 12105587 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 846DFC433E0 for ; Fri, 26 Feb 2021 01:29:57 +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 33D0C64EE4 for ; Fri, 26 Feb 2021 01:29:57 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 33D0C64EE4 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=pYam6UeSMttB6tGfBhc+Wx9kHGf7UDa7kgOI0xMzKwo=; b=Ae5FcN2DJmvxpkIY6wF+Ih1n9r SiFStsHSFYicV1p6cHlXbMOJC/ITztGZIr8M0fcfcRKOswEYJq94eCq5d7fy52lYo5Xw1dMNAoWg/ mTHM9+QIoYNfDUvlfMCJx9/XMcxTJaJ1/SU0+ixlxb17vMx8oFr3ULMDu8gS/9O/fnIxRm3ECcQIW rK6l0fs4oZYjfKdJL35vGco7MdyjBweM5QSq7O2nyHSjGhnOqwu4bk3V8FAbfJv6GZ1GntgZm4PAK E7zn1RSfU59UE+lA+QChh3eyj9xp61KqX+vnFfpjCMcBrMUh4sK83dP2Q+j+4HHZ7cLEaLO1T9hkP PLIrLYTQ==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1lFRw3-0003fl-E5; Fri, 26 Feb 2021 01:28:51 +0000 Received: from out30-45.freemail.mail.aliyun.com ([115.124.30.45]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1lFRw0-0003eK-08 for linux-arm-kernel@lists.infradead.org; Fri, 26 Feb 2021 01:28:49 +0000 X-Alimail-AntiSpam: AC=PASS; BC=-1|-1; BR=01201311R131e4; CH=green; DM=||false|; DS=||; FP=0|-1|-1|-1|0|-1|-1|-1; HT=e01e04420; MF=yang.lee@linux.alibaba.com; NM=1; PH=DS; RN=8; SR=0; TI=SMTPD_---0UPaXT4q_1614302921; Received: from j63c13417.sqa.eu95.tbsite.net(mailfrom:yang.lee@linux.alibaba.com fp:SMTPD_---0UPaXT4q_1614302921) by smtp.aliyun-inc.com(127.0.0.1); Fri, 26 Feb 2021 09:28:42 +0800 From: Yang Li To: mchehab@kernel.org Subject: [PATCH v2] media: exynos4-is: add missing call to of_node_put() Date: Fri, 26 Feb 2021 09:28:40 +0800 Message-Id: <1614302920-19505-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_202848_312762_4CBC4B35 X-CRM114-Status: UNSURE ( 9.75 ) X-CRM114-Notice: Please train this message. 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: linux-samsung-soc@vger.kernel.org, linux-kernel@vger.kernel.org, krzk@kernel.org, Yang Li , s.nawrocki@samsung.com, linux-arm-kernel@lists.infradead.org, linux-media@vger.kernel.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 in fimc_md_parse_one_endpoint, add missing call to of_node_put(). Fix the following coccicheck warning: ./drivers/media/platform/exynos4-is/media-dev.c:489:1-23: WARNING: Function "for_each_child_of_node" should have of_node_put() before return around line 492. Reported-by: Abaci Robot Signed-off-by: Yang Li --- Changes in v2: -add braces for if drivers/media/platform/exynos4-is/media-dev.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/drivers/media/platform/exynos4-is/media-dev.c b/drivers/media/platform/exynos4-is/media-dev.c index 8e1e892..a6ee2a3 100644 --- a/drivers/media/platform/exynos4-is/media-dev.c +++ b/drivers/media/platform/exynos4-is/media-dev.c @@ -488,8 +488,10 @@ static int fimc_md_parse_port_node(struct fimc_md *fmd, for_each_child_of_node(port, ep) { ret = fimc_md_parse_one_endpoint(fmd, ep); - if (ret < 0) + if (ret < 0) { + of_node_put(ep); return ret; + } } return 0;