[PATCH] mailbox: zynqmp-ipi: Add of_node_put() before goto
Michal Simek
michal.simek at xilinx.com
Mon Oct 18 00:23:49 PDT 2021
+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 at vivo.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++;
>
More information about the linux-arm-kernel
mailing list