aboutsummaryrefslogtreecommitdiffstats
path: root/arch/mips/math-emu
diff options
context:
space:
mode:
authorZhaolei <zhaolei@cn.fujitsu.com>2008-10-17 19:12:30 +0800
committerRalf Baechle <ralf@linux-mips.org>2008-10-27 16:18:25 +0000
commitecab1f4479abb88d739bc1aac5545e8399fbad66 (patch)
tree00923c379480f8a8dae115892e5b486c9211bb8d /arch/mips/math-emu
parentf8d56f1771e4867acc461146764b4feeb5245669 (diff)
downloadkernel_samsung_tuna-ecab1f4479abb88d739bc1aac5545e8399fbad66.zip
kernel_samsung_tuna-ecab1f4479abb88d739bc1aac5545e8399fbad66.tar.gz
kernel_samsung_tuna-ecab1f4479abb88d739bc1aac5545e8399fbad66.tar.bz2
MIPS: Fix debugfs_create_*'s error checking method for arch/mips/math-emu/
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>
Diffstat (limited to 'arch/mips/math-emu')
-rw-r--r--arch/mips/math-emu/cp1emu.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/arch/mips/math-emu/cp1emu.c b/arch/mips/math-emu/cp1emu.c
index b08fc65..7ec0b21 100644
--- a/arch/mips/math-emu/cp1emu.c
+++ b/arch/mips/math-emu/cp1emu.c
@@ -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;
}