From: Yang Li <yang.lee@linux.alibaba.com> 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 <yang.lee@linux.alibaba.com> Subject: [PATCH v2] media: exynos4-is: add missing call to of_node_put() Date: Fri, 26 Feb 2021 09:28:40 +0800 [thread overview] Message-ID: <1614302920-19505-1-git-send-email-yang.lee@linux.alibaba.com> (raw) 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 <abaci@linux.alibaba.com> Signed-off-by: Yang Li <yang.lee@linux.alibaba.com> --- 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
WARNING: multiple messages have this Message-ID (diff)
From: Yang Li <yang.lee@linux.alibaba.com> To: mchehab@kernel.org Cc: linux-samsung-soc@vger.kernel.org, linux-kernel@vger.kernel.org, krzk@kernel.org, Yang Li <yang.lee@linux.alibaba.com>, s.nawrocki@samsung.com, linux-arm-kernel@lists.infradead.org, linux-media@vger.kernel.org Subject: [PATCH v2] media: exynos4-is: add missing call to of_node_put() Date: Fri, 26 Feb 2021 09:28:40 +0800 [thread overview] Message-ID: <1614302920-19505-1-git-send-email-yang.lee@linux.alibaba.com> (raw) 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 <abaci@linux.alibaba.com> Signed-off-by: Yang Li <yang.lee@linux.alibaba.com> --- 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 _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
next reply other threads:[~2021-02-26 1:29 UTC|newest] Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top 2021-02-26 1:28 Yang Li [this message] 2021-02-26 1:28 ` [PATCH v2] media: exynos4-is: add missing call to of_node_put() Yang Li 2021-02-26 10:29 ` Krzysztof Kozlowski 2021-02-26 10:29 ` Krzysztof Kozlowski
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=1614302920-19505-1-git-send-email-yang.lee@linux.alibaba.com \ --to=yang.lee@linux.alibaba.com \ --cc=krzk@kernel.org \ --cc=linux-arm-kernel@lists.infradead.org \ --cc=linux-kernel@vger.kernel.org \ --cc=linux-media@vger.kernel.org \ --cc=linux-samsung-soc@vger.kernel.org \ --cc=mchehab@kernel.org \ --cc=s.nawrocki@samsung.com \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes, see mirroring instructions on how to clone and mirror all data and code used by this external index.