From: Tyson Nottingham Date: Fri, 30 Mar 2018 04:03:38 +0000 (-0400) Subject: ext4: null out kobject* during sysfs cleanup X-Git-Tag: v4.17-rc1~134^2~9 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=c2e5df762601157f9c101025f10f873ae792e6cb;p=thirdparty%2Fkernel%2Flinux.git ext4: null out kobject* during sysfs cleanup Make cleanup of ext4_feat kobject consistent with similar objects. Signed-off-by: Tyson Nottingham Signed-off-by: Theodore Ts'o --- diff --git a/fs/ext4/sysfs.c b/fs/ext4/sysfs.c index 1205261f130cb..aa8165e7c44b3 100644 --- a/fs/ext4/sysfs.c +++ b/fs/ext4/sysfs.c @@ -464,6 +464,7 @@ int __init ext4_init_sysfs(void) feat_err: kobject_put(ext4_feat); + ext4_feat = NULL; kset_err: kset_unregister(ext4_kset); ext4_kset = NULL; @@ -473,6 +474,7 @@ kset_err: void ext4_exit_sysfs(void) { kobject_put(ext4_feat); + ext4_feat = NULL; kset_unregister(ext4_kset); ext4_kset = NULL; remove_proc_entry(proc_dirname, NULL);