提交 af8d0f6d 编写于 作者: W Wang Qing 提交者: Jassi Brar

mailbox: mtk: add missing of_node_put before return

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

Early exits from for_each_child_of_node should decrement the
node reference counter.
Signed-off-by: NWang Qing <wangqing@vivo.com>
Signed-off-by: NJassi Brar <jaswinder.singh@linaro.org>
上级 24531288
......@@ -573,6 +573,7 @@ static int cmdq_probe(struct platform_device *pdev)
cmdq->clocks[alias_id].id = clk_names[alias_id];
cmdq->clocks[alias_id].clk = of_clk_get(node, 0);
if (IS_ERR(cmdq->clocks[alias_id].clk)) {
of_node_put(node);
return dev_err_probe(dev,
PTR_ERR(cmdq->clocks[alias_id].clk),
"failed to get gce clk: %d\n",
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册