From aa55a203f98b53a0f99441c0c424cada101098f6 Mon Sep 17 00:00:00 2001 From: green Date: Tue, 13 Dec 2005 22:36:10 +0000 Subject: [PATCH] r=adilger Move lprocfs_register return value check under LPROCFS ifdef. IS_ERR threats NULL as error too. --- lustre/obdclass/genops.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lustre/obdclass/genops.c b/lustre/obdclass/genops.c index cb1eb32..b55e0df 100644 --- a/lustre/obdclass/genops.c +++ b/lustre/obdclass/genops.c @@ -122,12 +122,12 @@ int class_register_type(struct obd_ops *ops, struct lprocfs_vars *vars, #ifdef LPROCFS type->typ_procroot = lprocfs_register(type->typ_name, proc_lustre_root, vars, type); -#endif if (IS_ERR(type->typ_procroot)) { rc = PTR_ERR(type->typ_procroot); type->typ_procroot = NULL; GOTO (failed, rc); } +#endif spin_lock(&obd_types_lock); list_add(&type->typ_chain, &obd_types); -- 1.8.3.1