[PATCH] [POWERPC] Fix return value check logic

Emil Medve Emilian.Medve at Freescale.com
Fri May 23 05:49:22 EST 2008


debugfs_create_file() return a non-NULL (non-zero) value in case of success

This fixes this non-critical boot-time debuging 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 at Freescale.com>
---

$ scripts/checkpatch.pl 0001--POWERPC-Fix-return-value-check-logic.patch 
total: 0 errors, 0 warnings, 8 lines checked

0001--POWERPC-Fix-return-value-check-logic.patch has no obvious style problems and is ready for submission.

 arch/powerpc/kernel/irq.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/arch/powerpc/kernel/irq.c b/arch/powerpc/kernel/irq.c
index 2f73f70..bcc249d 100644
--- a/arch/powerpc/kernel/irq.c
+++ b/arch/powerpc/kernel/irq.c
@@ -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;
-- 
1.5.5.GIT



More information about the Linuxppc-embedded mailing list