提交 b13365bb 编写于 作者: V Vladimir Zapolskiy 提交者: Greg Kroah-Hartman

misc: sram: fix device node reference leak on error

A pointer device node reference should be decremented on manual exit
from for_each_available_child_of_node() loop.
Signed-off-by: NVladimir Zapolskiy <vladimir_zapolskiy@mentor.com>
Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
上级 ee895ccd
......@@ -112,6 +112,7 @@ static int sram_probe(struct platform_device *pdev)
dev_err(&pdev->dev,
"could not get address for node %s\n",
child->full_name);
of_node_put(child);
goto err_chunks;
}
......@@ -120,6 +121,7 @@ static int sram_probe(struct platform_device *pdev)
"reserved block %s outside the sram area\n",
child->full_name);
ret = -EINVAL;
of_node_put(child);
goto err_chunks;
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册