From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756216AbbGFQzF (ORCPT ); Mon, 6 Jul 2015 12:55:05 -0400 Received: from linuxhacker.ru ([217.76.32.60]:53204 "EHLO fiona.linuxhacker.ru" rhost-flags-OK-FAIL-OK-OK) by vger.kernel.org with ESMTP id S1752212AbbGFQtT (ORCPT ); Mon, 6 Jul 2015 12:49:19 -0400 From: green@linuxhacker.ru To: Greg Kroah-Hartman , devel@driverdev.osuosl.org, Andreas Dilger Cc: Linux Kernel Mailing List , Oleg Drokin Subject: [PATCH 04/20] staging/lustre/obdclass: fix class_procfs_init error return value Date: Mon, 6 Jul 2015 12:48:42 -0400 Message-Id: <1436201338-14263-5-git-send-email-green@linuxhacker.ru> X-Mailer: git-send-email 2.1.0 In-Reply-To: <1436201338-14263-1-git-send-email-green@linuxhacker.ru> References: <1436201338-14263-1-git-send-email-green@linuxhacker.ru> Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Oleg Drokin 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. Signed-off-by: Oleg Drokin --- drivers/staging/lustre/lustre/obdclass/linux/linux-module.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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); -- 2.1.0