]> git.proxmox.com Git - mirror_ubuntu-disco-kernel.git/commitdiff
MIPS: Fix debugfs_create_*'s error checking method for arch/mips/math-emu/
authorZhaolei <zhaolei@cn.fujitsu.com>
Fri, 17 Oct 2008 11:12:30 +0000 (19:12 +0800)
committerRalf Baechle <ralf@linux-mips.org>
Mon, 27 Oct 2008 16:18:25 +0000 (16:18 +0000)
debugfs_create_*() returns NULL on error.  Make its caller debugfs_fpuemu
return -ENODEV on error.

Signed-off-by: Zhao Lei <zhaolei@cn.fujitsu.com>
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
arch/mips/math-emu/cp1emu.c

index b08fc65c13a63c5c24e50acfca5328ae3d90337c..7ec0b217dfd3087fd317810e2bc14cea75ec6f6f 100644 (file)
@@ -1299,12 +1299,12 @@ static int __init debugfs_fpuemu(void)
        if (!mips_debugfs_dir)
                return -ENODEV;
        dir = debugfs_create_dir("fpuemustats", mips_debugfs_dir);
-       if (IS_ERR(dir))
-               return PTR_ERR(dir);
+       if (!dir)
+               return -ENOMEM;
        for (i = 0; i < ARRAY_SIZE(vars); i++) {
                d = debugfs_create_u32(vars[i].name, S_IRUGO, dir, vars[i].v);
-               if (IS_ERR(d))
-                       return PTR_ERR(d);
+               if (!d)
+                       return -ENOMEM;
        }
        return 0;
 }