Skip to content

Commit 2453128

Browse files
Wang QingJassiBrar
authored andcommitted
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 <[email protected]> Signed-off-by: Jassi Brar <[email protected]>
1 parent 05d06f3 commit 2453128

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

drivers/mailbox/zynqmp-ipi-mailbox.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -655,6 +655,7 @@ static int zynqmp_ipi_probe(struct platform_device *pdev)
655655
mbox->pdata = pdata;
656656
ret = zynqmp_ipi_mbox_probe(mbox, nc);
657657
if (ret) {
658+
of_node_put(nc);
658659
dev_err(dev, "failed to probe subdev.\n");
659660
ret = -EINVAL;
660661
goto free_mbox_dev;

0 commit comments

Comments
 (0)