You've already forked linux-apfs
mirror of
https://github.com/linux-apfs/linux-apfs.git
synced 2026-05-01 15:00:59 -07:00
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>
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user