提交 32dfab3c 编写于 作者: K Kulikov Vasiliy 提交者: Paul Mundt

sh: dma: check return value of create_proc_read_entry()

create_proc_read_entry() may fail, if so return -ENOMEM.
Signed-off-by: NKulikov Vasiliy <segooon@gmail.com>
Signed-off-by: NPaul Mundt <lethal@linux-sh.org>
上级 38409d72
......@@ -412,8 +412,8 @@ EXPORT_SYMBOL(unregister_dmac);
static int __init dma_api_init(void)
{
printk(KERN_NOTICE "DMA: Registering DMA API.\n");
create_proc_read_entry("dma", 0, 0, dma_read_proc, 0);
return 0;
return create_proc_read_entry("dma", 0, 0, dma_read_proc, 0)
? 0 : -ENOMEM;
}
subsys_initcall(dma_api_init);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册