diff options
author | Zhaolei <zhaolei@cn.fujitsu.com> | 2008-10-17 19:25:09 +0800 |
---|---|---|
committer | Paul Mundt <lethal@linux-sh.org> | 2008-10-20 10:40:21 +0900 |
commit | 25627c7fd71269e2658b6872eef65719ee80b9aa (patch) | |
tree | 9f5b6f11354ef176348a42aa969c93b3f5794f8f /arch/sh/mm/pmb.c | |
parent | 9986b311efdc9727a5a48f03c3dac3d536fbaa74 (diff) | |
download | op-kernel-dev-25627c7fd71269e2658b6872eef65719ee80b9aa.zip op-kernel-dev-25627c7fd71269e2658b6872eef65719ee80b9aa.tar.gz |
Fix debugfs_create_file's error checking method for arch/sh/mm/
debugfs_create_file() returns NULL if an error occurs, returns -ENODEV
when debugfs is not enabled in the kernel.
Signed-off-by: Zhao Lei <zhaolei@cn.fujitsu.com>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
Diffstat (limited to 'arch/sh/mm/pmb.c')
-rw-r--r-- | arch/sh/mm/pmb.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/arch/sh/mm/pmb.c b/arch/sh/mm/pmb.c index cef7276..8424167 100644 --- a/arch/sh/mm/pmb.c +++ b/arch/sh/mm/pmb.c @@ -394,6 +394,8 @@ static int __init pmb_debugfs_init(void) dentry = debugfs_create_file("pmb", S_IFREG | S_IRUGO, sh_debugfs_root, NULL, &pmb_debugfs_fops); + if (!dentry) + return -ENOMEM; if (IS_ERR(dentry)) return PTR_ERR(dentry); |