lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAPybu_30=ua4emx3hP2eFeJ4gtoOncah+X+NmsBdQq7cTuqZ+g@mail.gmail.com>
Date:   Wed, 9 Feb 2022 11:33:34 +0100
From:   Ricardo Ribalda Delgado <ricardo.ribalda@...il.com>
To:     Julia Lawall <julia.lawall@...ia.fr>
Cc:     Amit Kumar Mahapatra <amit.kumar-mahapatra@...inx.com>,
        Michal Simek <monstr@...str.eu>,
        Sai Krishna Potthuri <lakshmi.sai.krishna.potthuri@...inx.com>,
        Tejas Prajapati Rameshchandra <tejaspra@...inx.com>,
        Naga Sureshkumar Relli <nagasure@...inx.com>,
        Shubhrajyoti Datta <shubhrajyoti.datta@...inx.com>,
        Mark Brown <broonie@...nel.org>,
        linux-spi <linux-spi@...r.kernel.org>,
        "moderated list:ARM/S5P EXYNOS AR..." 
        <linux-arm-kernel@...ts.infradead.org>,
        LKML <linux-kernel@...r.kernel.org>, kbuild-all@...ts.01.org
Subject: Re: [PATCH] spi: spi-xilinx: fix for_each_child.cocci warnings

On Tue, Feb 8, 2022 at 9:51 PM Julia Lawall <julia.lawall@...ia.fr> wrote:
>
> From: kernel test robot <lkp@...el.com>
>
> After for_each_available_child_of_node, of_node_put is needed before break
> and return.
>
> Generated by: scripts/coccinelle/iterators/for_each_child.cocci
>
> Fixes: 3973536c4560 ("spi: spi-xilinx: Updated axi-qspi controller driver")
> CC: Amit Kumar Mahapatra <amit.kumar-mahapatra@...inx.com>
> Reported-by: kernel test robot <lkp@...el.com>
> Signed-off-by: kernel test robot <lkp@...el.com>
> Signed-off-by: Julia Lawall <julia.lawall@...ia.fr>

Signed-off-by: Ricardo Ribalda <ribalda@...omium.org>
> ---
>
> tree:   https://github.com/Xilinx/linux-xlnx xlnx_rebase_v5.15
> head:   1183ce490adb103e5e569b8ebd74c50c885ddc05
> commit: 3973536c456079bf3d09e9a97bf33d29422b183f [861/872] spi: spi-xilinx: Updated axi-qspi controller driver
> :::::: branch date: 7 days ago
> :::::: commit date: 7 days ago
>
>  spi-xilinx.c |    5 ++++-
>  1 file changed, 4 insertions(+), 1 deletion(-)
>
> --- a/drivers/spi/spi-xilinx.c
> +++ b/drivers/spi/spi-xilinx.c
> @@ -693,13 +693,16 @@ static int xilinx_spi_probe(struct platf
>                 if (startup_block) {
>                         ret = of_property_read_u32(nc, "reg",
>                                                    &cs_num);
> -                       if (ret < 0)
> +                       if (ret < 0) {
> +                               of_node_put(nc);
>                                 return -EINVAL;
> +                       }
>                 }
>                 ret = of_property_read_u32(nc, "spi-rx-bus-width",
>                                            &rx_bus_width);
>                 if (!ret) {
>                         xspi->rx_bus_width = rx_bus_width;
> +                       of_node_put(nc);
>                         break;
>                 }
>         }



-- 
Ricardo Ribalda

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ