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] [day] [month] [year] [list]
Message-ID: <53c559a8-9bea-c4f9-3650-88e033a2a3f4@xilinx.com>
Date:   Mon, 18 Oct 2021 09:23:49 +0200
From:   Michal Simek <michal.simek@...inx.com>
To:     Wan Jiabing <wanjiabing@...o.com>,
        Jassi Brar <jassisinghbrar@...il.com>,
        Michal Simek <michal.simek@...inx.com>,
        <linux-kernel@...r.kernel.org>,
        <linux-arm-kernel@...ts.infradead.org>,
        Wendy Liang <wendy.liang@...inx.com>
CC:     <kael_w@...h.net>
Subject: Re: [PATCH] mailbox: zynqmp-ipi: Add of_node_put() before goto

+Wendy: Please check.

M

On 10/18/21 03:34, Wan Jiabing wrote:
> Fix following coccicheck warning:
> ./drivers/mailbox/zynqmp-ipi-mailbox.c:654:1-33: WARNING: Function
> for_each_available_child_of_node should have of_node_put() before goto
> 
> Early exits from for_each_available_child_of_node should decrement the
> node reference counter.
> 
> Signed-off-by: Wan Jiabing <wanjiabing@...o.com>
> ---
>   drivers/mailbox/zynqmp-ipi-mailbox.c | 1 +
>   1 file changed, 1 insertion(+)
> 
> diff --git a/drivers/mailbox/zynqmp-ipi-mailbox.c b/drivers/mailbox/zynqmp-ipi-mailbox.c
> index f44079d62b1a..67d4203fb4f5 100644
> --- a/drivers/mailbox/zynqmp-ipi-mailbox.c
> +++ b/drivers/mailbox/zynqmp-ipi-mailbox.c
> @@ -657,6 +657,7 @@ static int zynqmp_ipi_probe(struct platform_device *pdev)
>   		if (ret) {
>   			dev_err(dev, "failed to probe subdev.\n");
>   			ret = -EINVAL;
> +			of_node_put(nc);
>   			goto free_mbox_dev;
>   		}
>   		mbox++;
> 

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ