]> pilppa.com Git - linux-2.6-omap-h63xx.git/commitdiff
[POWERPC] Fix return value check logic in debugfs virq_mapping setup
authorEmil Medve <Emilian.Medve@Freescale.com>
Thu, 22 May 2008 19:49:22 +0000 (05:49 +1000)
committerPaul Mackerras <paulus@samba.org>
Mon, 16 Jun 2008 05:00:25 +0000 (15:00 +1000)
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>
arch/powerpc/kernel/irq.c

index 2f73f705d56449a3c4416f14180264f0e981d0ca..bcc249d90c4deee52b8d6af1d711dc493e8fb7ad 100644 (file)
@@ -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;