diff options
author | Andrew Morton <akpm@linux-foundation.org> | 2009-02-04 15:12:07 -0800 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2009-02-05 12:56:47 -0800 |
commit | 44f0606d52d98ff05b3b62bb694821857e36819d (patch) | |
tree | 9aec0abf691fbe2d264c653dc7d445e63523f696 /drivers/platform | |
parent | 60fd760fb9ff7034360bab7137c917c0330628c2 (diff) | |
download | op-kernel-dev-44f0606d52d98ff05b3b62bb694821857e36819d.zip op-kernel-dev-44f0606d52d98ff05b3b62bb694821857e36819d.tar.gz |
hp-wmi: fix error path in hp_wmi_bios_setup()
The error-path code can call rfkill_unregister() with a pointer which does
not contain the result of a call to rfkill_register(). It goes BUG().
Addresses http://bugzilla.kernel.org/show_bug.cgi?id=12560.
Cc: Frans Pop <elendil@planet.nl>
Cc: Larry Finger <Larry.Finger@lwfinger.net>
Cc: Len Brown <lenb@kernel.org>
Acked-by: Matthew Garrett <mjg@redhat.com>
Reported-by: Helge Deller <deller@gmx.de>
Testted-by: Helge Deller <deller@gmx.de>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'drivers/platform')
-rw-r--r-- | drivers/platform/x86/hp-wmi.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/drivers/platform/x86/hp-wmi.c b/drivers/platform/x86/hp-wmi.c index de91dda..f41135f 100644 --- a/drivers/platform/x86/hp-wmi.c +++ b/drivers/platform/x86/hp-wmi.c @@ -463,9 +463,11 @@ static int __init hp_wmi_bios_setup(struct platform_device *device) return 0; register_wwan_err: - rfkill_unregister(bluetooth_rfkill); + if (bluetooth_rfkill) + rfkill_unregister(bluetooth_rfkill); register_bluetooth_error: - rfkill_unregister(wifi_rfkill); + if (wifi_rfkill) + rfkill_unregister(wifi_rfkill); add_sysfs_error: cleanup_sysfs(device); return err; |