From: Oleg Drokin Date: Mon, 6 Jul 2015 16:48:42 +0000 (-0400) Subject: staging/lustre/obdclass: fix class_procfs_init error return value X-Git-Tag: v4.9.8~3706^2~731 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=3c4872f94359ed38a1392c0a9238c48a9aee6f8f;p=platform%2Fkernel%2Flinux-rpi3.git 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: Dan Carpenter Signed-off-by: Oleg Drokin Signed-off-by: Greg Kroah-Hartman --- diff --git a/drivers/staging/lustre/lustre/obdclass/linux/linux-module.c b/drivers/staging/lustre/lustre/obdclass/linux/linux-module.c index 84f75dc..b618c0b 100644 --- a/drivers/staging/lustre/lustre/obdclass/linux/linux-module.c +++ b/drivers/staging/lustre/lustre/obdclass/linux/linux-module.c @@ -423,7 +423,7 @@ static struct attribute_group lustre_attr_group = { int class_procfs_init(void) { - int rc = 0; + int rc = -ENOMEM; struct dentry *file; lustre_kobj = kobject_create_and_add("lustre", fs_kobj);