From: Jonathan Cameron <jic23@kernel.org>
To: Julia Lawall <julia.lawall@inria.fr>,
Lars-Peter Clausen <lars@metafoo.de>
Cc: Anand Ashok Dumbre <anand.ashok.dumbre@xilinx.com>,
kbuild-all@lists.01.org, linux-arm-kernel@lists.infradead.org,
Michal Simek <monstr@monstr.eu>,
Dragan Cvetic <dragan.cvetic@xilinx.com>,
git@xilinx.com, linux-iio@vger.kernel.org,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH] iio: versal-sysmon: fix for_each_child.cocci warnings
Date: Sun, 13 Feb 2022 16:28:59 +0000 [thread overview]
Message-ID: <20220213162859.3d968256@jic23-huawei> (raw)
In-Reply-To: <alpine.DEB.2.22.394.2202122337090.3095@hadrien>
On Sat, 12 Feb 2022 23:39:33 +0100 (CET)
Julia Lawall <julia.lawall@inria.fr> wrote:
> From: kernel test robot <lkp@intel.com>
>
> For_each_child_of_node" should have of_node_put() before return.
>
> Generated by: scripts/coccinelle/iterators/for_each_child.cocci
>
> CC: Anand Ashok Dumbre <anand.ashok.dumbre@xilinx.com>
> Reported-by: kernel test robot <lkp@intel.com>
> Signed-off-by: kernel test robot <lkp@intel.com>
> Signed-off-by: Julia Lawall <julia.lawall@inria.fr>
>
> ---
>
> tree: https://github.com/Xilinx/linux-xlnx xlnx_rebase_v5.15
> head: 966124532656bc95d781abf57531e4cd4f962237
> commit: 1459646ab280aa68c3c4fa1d9552ea21f15d7a2d [543/923] iio: versal-sysmon: add driver for Versal Sysmon
> :::::: branch date: 3 days ago
> :::::: commit date: 12 days ago
>
> Please take the patch only if it's a positive warning. Thanks!
Patch is obviously correct, but this driver isn't upstream so from point of view
of the IIO tree I'm ignoring this.
Thanks,
Jonathan
>
> versal-sysmon.c | 8 ++++++--
> 1 file changed, 6 insertions(+), 2 deletions(-)
>
> --- a/drivers/iio/adc/versal-sysmon.c
> +++ b/drivers/iio/adc/versal-sysmon.c
> @@ -875,12 +875,16 @@ static int sysmon_parse_dt(struct iio_de
>
> for_each_child_of_node(np, child_node) {
> ret = of_property_read_u32(child_node, "reg", ®);
> - if (ret < 0)
> + if (ret < 0) {
> + of_node_put(child_node);
> return ret;
> + }
>
> ret = of_property_read_string(child_node, "xlnx,name", &name);
> - if (ret < 0)
> + if (ret < 0) {
> + of_node_put(child_node);
> return ret;
> + }
>
> sysmon_channels[i].type = IIO_VOLTAGE;
> sysmon_channels[i].indexed = 1;
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
prev parent reply other threads:[~2022-02-13 16:23 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-02-12 22:39 [PATCH] iio: versal-sysmon: fix for_each_child.cocci warnings Julia Lawall
2022-02-13 16:28 ` Jonathan Cameron [this message]
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=20220213162859.3d968256@jic23-huawei \
--to=jic23@kernel.org \
--cc=anand.ashok.dumbre@xilinx.com \
--cc=dragan.cvetic@xilinx.com \
--cc=git@xilinx.com \
--cc=julia.lawall@inria.fr \
--cc=kbuild-all@lists.01.org \
--cc=lars@metafoo.de \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-iio@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=monstr@monstr.eu \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox