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>
Šī revīzija ir iekļauta:

revīziju iesūtīja
Paul Mundt

vecāks
9986b311ef
revīzija
25627c7fd7
@@ -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);
|
||||
|
||||
|
Atsaukties uz šo jaunā problēmā
Block a user