diff options
author | Zhaolei <zhaolei@cn.fujitsu.com> | 2008-10-17 13:12:30 +0200 |
---|---|---|
committer | Ralf Baechle <ralf@linux-mips.org> | 2008-10-27 17:18:25 +0100 |
commit | ecab1f4479abb88d739bc1aac5545e8399fbad66 (patch) | |
tree | 00923c379480f8a8dae115892e5b486c9211bb8d /arch/mips | |
parent | Merge branch 'for-linus' of git://neil.brown.name/md (diff) | |
download | linux-ecab1f4479abb88d739bc1aac5545e8399fbad66.tar.xz linux-ecab1f4479abb88d739bc1aac5545e8399fbad66.zip |
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')
-rw-r--r-- | arch/mips/math-emu/cp1emu.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/arch/mips/math-emu/cp1emu.c b/arch/mips/math-emu/cp1emu.c index b08fc65c13a6..7ec0b217dfd3 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; } |