Commit 24531288 authored by Wang Qing's avatar Wang Qing Committed by Jassi Brar

mailbox: zynq: add missing of_node_put before return

Fix following coccicheck warning:
WARNING: Function "for_each_available_child_of_node"
should have of_node_put() before return.

Early exits from for_each_available_child_of_node should decrement the
node reference counter.
Signed-off-by: default avatarWang Qing <wangqing@vivo.com>
Signed-off-by: default avatarJassi Brar <jaswinder.singh@linaro.org>
parent 05d06f37
......@@ -655,6 +655,7 @@ static int zynqmp_ipi_probe(struct platform_device *pdev)
mbox->pdata = pdata;
ret = zynqmp_ipi_mbox_probe(mbox, nc);
if (ret) {
of_node_put(nc);
dev_err(dev, "failed to probe subdev.\n");
ret = -EINVAL;
goto free_mbox_dev;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment