Skip to content

Commit

Permalink
[POWERPC] Fix return value check logic in debugfs virq_mapping setup
Browse files Browse the repository at this point in the history
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: Emil Medve <Emilian.Medve@Freescale.com>
Acked-by: Michael Ellerman <michael@ellerman.id.au>
Signed-off-by: Paul Mackerras <paulus@samba.org>
  • Loading branch information
Emil Medve authored and Paul Mackerras committed Jun 16, 2008
1 parent 598056d commit 476ff8a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion arch/powerpc/kernel/irq.c
Original file line number Diff line number Diff line change
Expand Up @@ -1073,7 +1073,7 @@ static const struct file_operations virq_debug_fops = {
static int __init irq_debugfs_init(void)
{
if (debugfs_create_file("virq_mapping", S_IRUGO, powerpc_debugfs_root,
NULL, &virq_debug_fops))
NULL, &virq_debug_fops) == NULL)
return -ENOMEM;

return 0;
Expand Down

0 comments on commit 476ff8a

Please sign in to comment.