aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorZhaolei <zhaolei@cn.fujitsu.com>2008-10-17 07:12:30 -0400
committerRalf Baechle <ralf@linux-mips.org>2008-10-27 12:18:25 -0400
commitecab1f4479abb88d739bc1aac5545e8399fbad66 (patch)
tree00923c379480f8a8dae115892e5b486c9211bb8d
parentf8d56f1771e4867acc461146764b4feeb5245669 (diff)
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>
-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 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)
1299 if (!mips_debugfs_dir) 1299 if (!mips_debugfs_dir)
1300 return -ENODEV; 1300 return -ENODEV;
1301 dir = debugfs_create_dir("fpuemustats", mips_debugfs_dir); 1301 dir = debugfs_create_dir("fpuemustats", mips_debugfs_dir);
1302 if (IS_ERR(dir)) 1302 if (!dir)
1303 return PTR_ERR(dir); 1303 return -ENOMEM;
1304 for (i = 0; i < ARRAY_SIZE(vars); i++) { 1304 for (i = 0; i < ARRAY_SIZE(vars); i++) {
1305 d = debugfs_create_u32(vars[i].name, S_IRUGO, dir, vars[i].v); 1305 d = debugfs_create_u32(vars[i].name, S_IRUGO, dir, vars[i].v);
1306 if (IS_ERR(d)) 1306 if (!d)
1307 return PTR_ERR(d); 1307 return -ENOMEM;
1308 } 1308 }
1309 return 0; 1309 return 0;
1310} 1310}