Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp851364pxb; Thu, 25 Feb 2021 17:31:14 -0800 (PST) X-Google-Smtp-Source: ABdhPJzpE+RrWkDRAJG4Ov56QnglOrtKwqJXv+GcJmO1+02KlsPTgQadCXcI1qdjmGbUpkohnlHF X-Received: by 2002:a17:906:a44f:: with SMTP id cb15mr551517ejb.420.1614303074658; Thu, 25 Feb 2021 17:31:14 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1614303074; cv=none; d=google.com; s=arc-20160816; b=irHGxRakUIOOSD6CqnZFbyco3ocrWK7nvaZPI2/PvI+7nswzCf9ryJeSGMDmTCpb7n oHk/br/R5HzqMwxLvBDJmLUwSVs8LthRdMq2vfHXVVS/ov+qzEjRIOa2NtkZljdIzTvM F2iOQsfPWNspuwEWZYJg1u0IsKvT9sX16XkWiuYilCLmzNYPxv5rTyRNu4jgh/qI0hna OQiEO+GElqu9keLNErLbFccRHM2k1RZWBJBsKcLTD/RtS3nSYezfRJfYVzjfbSVtoOf5 ifL/bbM42YcPkwj5cTVWzOpvdSw42iZ6+y27ttGwVSDAIaz+AEBZBeMNq7C5nJ+pg5yq CjPQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:message-id:date:subject:cc:to:from; bh=8S3NXXzO8u7ilT9D9Zh6w9M7kAJJwLhDhgHBaA3/b1I=; b=In8SghE3Jf+Xokkcns+FuDMdEPgS77SIH6z5B9Xb6pQHKy90xfrxOocXUCq7w2SyHz 4yvejuDEdaW6WLzYDKoVVsA2DK2xbw4kn6XbDGuAmiH0SQdC1EzSjL9eUZ+TlyfqlgI0 KURg+DPvTUzmGkjGP8yPeH3nz7EqGHv4lRztGqZr6BK4n/alWpDix/KWT3jXETqPTY3d vwswtwmdgQzEZnumHKMzaX6lC5BsSZFUxgVLpypBI6bdHW6KgS1e4NQUuYg6LabLXGCa RY130L7bFZh6RMpyFHhSTHbdU8EmYR02/80L3xNdrbNof2wEClXikB1qf8A9DnxuY6sp nPqQ== ARC-Authentication-Results: i=1; mx.google.com; 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=fail (p=NONE sp=NONE dis=NONE) header.from=alibaba.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id gb39si4777779ejc.370.2021.02.25.17.30.51; Thu, 25 Feb 2021 17:31:14 -0800 (PST) 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; 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=fail (p=NONE sp=NONE dis=NONE) header.from=alibaba.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229849AbhBZB30 (ORCPT + 99 others); Thu, 25 Feb 2021 20:29:26 -0500 Received: from out30-132.freemail.mail.aliyun.com ([115.124.30.132]:40495 "EHLO out30-132.freemail.mail.aliyun.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229508AbhBZB3Z (ORCPT ); Thu, 25 Feb 2021 20:29:25 -0500 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 Cc: krzk@kernel.org, s.nawrocki@samsung.com, linux-media@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-samsung-soc@vger.kernel.org, linux-kernel@vger.kernel.org, Yang Li 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 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.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; -- 1.8.3.1