Skip to content

Commit

Permalink
mailbox: zynq: add missing of_node_put before return
Browse files Browse the repository at this point in the history
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]>
  • Loading branch information
Wang Qing authored and JassiBrar committed Jan 12, 2022
1 parent 05d06f3 commit 2453128
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions drivers/mailbox/zynqmp-ipi-mailbox.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 2453128

Please sign in to comment.