提交 2d15b9b4 编写于 作者: N Nishanth Aravamudan 提交者: Michael Ellerman

powerpc/numa: check error return from proc_create

proc_create can fail, we should check the return value and pass up the
failure.
Suggested-by: NMichael Ellerman <mpe@ellerman.id.au>
Signed-off-by: NNishanth Aravamudan <nacc@linux.vnet.ibm.com>
Signed-off-by: NMichael Ellerman <mpe@ellerman.id.au>
上级 6507955c
......@@ -1801,7 +1801,8 @@ static const struct file_operations topology_ops = {
static int topology_update_init(void)
{
start_topology_update();
proc_create("powerpc/topology_updates", 0644, NULL, &topology_ops);
if (!proc_create("powerpc/topology_updates", 0644, NULL, &topology_ops))
return -ENOMEM;
return 0;
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册