efi: fix always unregister kset of efivars in register_efivars
PATCH 1/1 efi: fix always unregister kset of efivars in register_efivars
The cc9c97b76aa7235d5a1de0f74f990097f77008b4 patch introduced a issue that always unregister kset of efivars in register_efivars.
This patch moved the kset_unregister function call to the kobject create check block for fix issue.
--- drivers/firmware/efivars.c | 6 ++---- 1 files changed, 2 insertions(+), 4 deletions(-)
drivers/firmware/efivars.c +2 -4
@@ -1595,7 +1595,8 @@ int register_efivars(struct efivars *efivars,if (!efivars->kobject) {pr_err ("efivars: Subsystem registration failed.\n" ); error = -ENOMEM ; - goto err_unreg_vars; +kset_unregister (efivars->kset); + goto out; }/*
@@ -1642,9 +1643,6 @@ int register_efivars(struct efivars *efivars,register_filesystem (&efivarfs_type); -err_unreg_vars: -kset_unregister (efivars->kset); - out:kfree (variable_name);
Signature · 1 line
1.6.0.2
A message that is not in the archive (sent off-list or not yet received): 1351493576-3094-1-git-send-email-jlee-IBi9RG/[email protected]
Quoted 6 lines · Chun-Yi
The
cc9c97b76aa7235d5a1de0f74f990097f77008b4patch introduced a issue that always unregister kset of efivars inregister_efivars.This patch moved the
kset_unregisterfunction call to the kobject create check block for fix issue.
Quoted 8 lines
Cc Matthew Garrett <[email protected]>Cc H. Peter Anvin <[email protected]>Cc Jeremy Kerr <[email protected]>Cc Matt Fleming <[email protected]>Signed-off-by Lee, Chun-Yi <jlee-IBi9RG/[email protected]>--- drivers/firmware/efivars.c | 6 ++---- 1 files changed, 2 insertions(+), 4 deletions(-)
Thanks Joey. What I ended up doing was squashing this patch with your previous version and rebasing my 'next' branch. That way, when this series is merged the bug will never appear.
Please take a look to make sure everything is OK.
Signature · 1 line
Matt Fleming, Intel Open Source Technology Center
A message that is not in the archive (sent off-list or not yet received): 1351537904.14888.44.camel-ZqTwcBeJ+wsBof6jY8KHXm7IUlhRatedral2JQCrhuEAvxtiuMwx3w@public.gmane.org
於 一,2012-10-29 於 19:11 +0000,Matt Fleming 提到:
Quoted 16 lines · Chun-Yi
Quoted 6 lines
The
cc9c97b76aa7235d5a1de0f74f990097f77008b4patch introduced a issue that always unregister kset of efivars inregister_efivars.This patch moved the
kset_unregisterfunction call to the kobject create check block for fix issue.Quoted 8 lines
Cc Matthew Garrett <[email protected]>Cc H. Peter Anvin <[email protected]>Cc Jeremy Kerr <[email protected]>Cc Matt Fleming <[email protected]>Signed-off-by Lee, Chun-Yi <jlee-IBi9RG/[email protected]>--- drivers/firmware/efivars.c | 6 ++---- 1 files changed, 2 insertions(+), 4 deletions(-)
Quoted 6 lines
Thanks Joey. What I ended up doing was squashing this patch with your previous version and rebasing my 'next' branch. That way, when this series is merged the bug will never appear.
Please take a look to make sure everything is OK.
I just check the next branch, this fix merged with patch commit eecceeb, everything is OK.
Thanks a lot!
Joey Lee