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: Wang Qing <wangqing@vivo.com> Signed-off-by: Jassi Brar <jaswinder.singh@linaro.org>
This commit is contained in:
parent
05d06f3719
commit
2453128847
|
@ -655,6 +655,7 @@ static int zynqmp_ipi_probe(struct platform_device *pdev)
|
||||||
mbox->pdata = pdata;
|
mbox->pdata = pdata;
|
||||||
ret = zynqmp_ipi_mbox_probe(mbox, nc);
|
ret = zynqmp_ipi_mbox_probe(mbox, nc);
|
||||||
if (ret) {
|
if (ret) {
|
||||||
|
of_node_put(nc);
|
||||||
dev_err(dev, "failed to probe subdev.\n");
|
dev_err(dev, "failed to probe subdev.\n");
|
||||||
ret = -EINVAL;
|
ret = -EINVAL;
|
||||||
goto free_mbox_dev;
|
goto free_mbox_dev;
|
||||||
|
|
Loading…
Reference in New Issue