All of lore.kernel.org
 help / color / mirror / Atom feed
From: kernel test robot <lkp@intel.com>
To: kbuild@lists.01.org
Subject: [PATCH] v4l: xilinx-vpss-csc: fix for_each_child.cocci warnings
Date: Sat, 28 Aug 2021 17:19:36 +0800	[thread overview]
Message-ID: <20210828091936.GA36690@72ef8f4dd4c6> (raw)
In-Reply-To: <202108281703.6bOqPBYe-lkp@intel.com>

[-- Attachment #1: Type: text/plain, Size: 2467 bytes --]

CC: kbuild-all(a)lists.01.org
CC: linux-arm-kernel(a)lists.infradead.org
TO: Rohit Athavale <rohit.athavale@xilinx.com>
CC: Michal Simek <monstr@monstr.eu>
CC: Hyun Kwon <hyun.kwon@xilinx.com>
CC: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
CC: Mauro Carvalho Chehab <mchehab@kernel.org>
CC: linux-media(a)vger.kernel.org
CC: linux-arm-kernel(a)lists.infradead.org
CC: linux-kernel(a)vger.kernel.org

From: kernel test robot <lkp@intel.com>

drivers/media/platform/xilinx/xilinx-vpss-csc.c:747:1-23: WARNING: Function "for_each_child_of_node" should have of_node_put() before return around line 752.
drivers/media/platform/xilinx/xilinx-vpss-csc.c:747:1-23: WARNING: Function "for_each_child_of_node" should have of_node_put() before return around line 758.
drivers/media/platform/xilinx/xilinx-vpss-csc.c:747:1-23: WARNING: Function "for_each_child_of_node" should have of_node_put() before return around line 763.


Semantic patch information:
 False positives can be due to function calls within the for_each
 loop that may encapsulate an of_node_put.

Generated by: scripts/coccinelle/iterators/for_each_child.cocci

CC: Rohit Athavale <rohit.athavale@xilinx.com>
Reported-by: kernel test robot <lkp@intel.com>
Signed-off-by: kernel test robot <lkp@intel.com>
---

tree:   https://github.com/Xilinx/linux-xlnx master
head:   45cd0074cdf1ddd710b28848e6a860b442babfcc
commit: 7d47a653da2e81cb73f43e507664d36305819ea1 [10741/12418] v4l: xilinx-vpss-csc: driver support for xilinx vpss csc
:::::: branch date: 5 days ago
:::::: commit date: 5 months ago

Please take the patch only if it's a positive warning. Thanks!

 xilinx-vpss-csc.c |    3 +++
 1 file changed, 3 insertions(+)

--- a/drivers/media/platform/xilinx/xilinx-vpss-csc.c
+++ b/drivers/media/platform/xilinx/xilinx-vpss-csc.c
@@ -749,17 +749,20 @@ static int xcsc_parse_of(struct xcsc_dev
 			vip_format = xvip_of_get_format(port);
 			if (IS_ERR(vip_format)) {
 				dev_err(dev, "Invalid media pad format in DT");
+				of_node_put(port);
 				return PTR_ERR(vip_format);
 			}
 
 			rval = of_property_read_u32(port, "reg", &port_id);
 			if (rval < 0) {
 				dev_err(dev, "No reg in DT to specify pad");
+				of_node_put(port);
 				return rval;
 			}
 
 			if (port_id != 0 && port_id != 1) {
 				dev_err(dev, "Invalid reg in DT");
+				of_node_put(port);
 				return -EINVAL;
 			}
 			xcsc->vip_formats[port_id] = vip_format;

  reply	other threads:[~2021-08-28  9:19 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-08-28  9:19 [xlnx:master 10741/12418] drivers/media/platform/xilinx/xilinx-vpss-csc.c:747:1-23: WARNING: Function "for_each_child_of_node" should have of_node_put() before return around line 752 kernel test robot
2021-08-28  9:19 ` kernel test robot [this message]
  -- strict thread matches above, loose matches on Subject: below --
2021-08-28 11:04 [PATCH] v4l: xilinx-vpss-csc: fix for_each_child.cocci warnings Julia Lawall
2021-08-28 11:04 ` Julia Lawall
2021-08-28 11:04 ` Julia Lawall
2021-08-26  5:01 [xlnx:master 10741/12418] drivers/media/platform/xilinx/xilinx-vpss-csc.c:747:1-23: WARNING: Function "for_each_child_of_node" should have of_node_put() before return around line 752 kernel test robot
2021-08-26  5:01 ` [PATCH] v4l: xilinx-vpss-csc: fix for_each_child.cocci warnings kernel test robot

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=20210828091936.GA36690@72ef8f4dd4c6 \
    --to=lkp@intel.com \
    --cc=kbuild@lists.01.org \
    /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: link
Be 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.