提交 476ff8a0 编写于 作者: E Emil Medve 提交者: Paul Mackerras

[POWERPC] Fix return value check logic in debugfs virq_mapping setup

debugfs_create_file() returns a non-NULL (non-zero) value in case of
success, not a NULL value.

This fixes this non-critical boot-time debugging error message:

[    1.316386] calling  irq_debugfs_init+0x0/0x50
[    1.316399] initcall irq_debugfs_init+0x0/0x50 returned -12 after 0 msecs
[    1.316411] initcall irq_debugfs_init+0x0/0x50 returned with error code -12
Signed-off-by: NEmil Medve <Emilian.Medve@Freescale.com>
Acked-by: NMichael Ellerman <michael@ellerman.id.au>
Signed-off-by: NPaul Mackerras <paulus@samba.org>
上级 598056d5
...@@ -1073,7 +1073,7 @@ static const struct file_operations virq_debug_fops = { ...@@ -1073,7 +1073,7 @@ static const struct file_operations virq_debug_fops = {
static int __init irq_debugfs_init(void) static int __init irq_debugfs_init(void)
{ {
if (debugfs_create_file("virq_mapping", S_IRUGO, powerpc_debugfs_root, if (debugfs_create_file("virq_mapping", S_IRUGO, powerpc_debugfs_root,
NULL, &virq_debug_fops)) NULL, &virq_debug_fops) == NULL)
return -ENOMEM; return -ENOMEM;
return 0; return 0;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册