summaryrefslogtreecommitdiff
path: root/drivers/mailbox
diff options
context:
space:
mode:
authorWang Qing <wangqing@vivo.com>2021-12-13 12:44:20 +0300
committerJassi Brar <jaswinder.singh@linaro.org>2022-01-12 08:47:32 +0300
commit2453128847ca1edbecbe33dbe063a04489d64842 (patch)
tree853fccc3fafe00a99b6c9d2250add42c95230e4a /drivers/mailbox
parent05d06f37196b2e3abeff2b98b785c8803865e646 (diff)
downloadlinux-2453128847ca1edbecbe33dbe063a04489d64842.tar.xz
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>
Diffstat (limited to 'drivers/mailbox')
-rw-r--r--drivers/mailbox/zynqmp-ipi-mailbox.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/mailbox/zynqmp-ipi-mailbox.c b/drivers/mailbox/zynqmp-ipi-mailbox.c
index f44079d62b1a..31a0fa914274 100644
--- a/drivers/mailbox/zynqmp-ipi-mailbox.c
+++ b/drivers/mailbox/zynqmp-ipi-mailbox.c
@@ -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;