Commit 3c4872f9 authored by Oleg Drokin's avatar Oleg Drokin Committed by Greg Kroah-Hartman

staging/lustre/obdclass: fix class_procfs_init error return value

Dan Carpenter noticed that procfs conversion patches introduced
a bug where should kobject_create_and_add, an error is not returned
from class_procfs_init.
Reported-by: default avatarDan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: default avatarOleg Drokin <green@linuxhacker.ru>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent faa7a4e3
...@@ -423,7 +423,7 @@ static struct attribute_group lustre_attr_group = { ...@@ -423,7 +423,7 @@ static struct attribute_group lustre_attr_group = {
int class_procfs_init(void) int class_procfs_init(void)
{ {
int rc = 0; int rc = -ENOMEM;
struct dentry *file; struct dentry *file;
lustre_kobj = kobject_create_and_add("lustre", fs_kobj); lustre_kobj = kobject_create_and_add("lustre", fs_kobj);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment