]> Git Repo - linux.git/commitdiff
hp-wmi: fix error path in hp_wmi_bios_setup()
authorAndrew Morton <[email protected]>
Wed, 4 Feb 2009 23:12:07 +0000 (15:12 -0800)
committerLinus Torvalds <[email protected]>
Thu, 5 Feb 2009 20:56:47 +0000 (12:56 -0800)
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 <[email protected]>
Cc: Larry Finger <[email protected]>
Cc: Len Brown <[email protected]>
Acked-by: Matthew Garrett <[email protected]>
Reported-by: Helge Deller <[email protected]>
Testted-by: Helge Deller <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
drivers/platform/x86/hp-wmi.c

index de91ddab0a86091fc353938125b04a69893c8554..f41135f2fb299dea3efbd6cc68a6479ce7a5002a 100644 (file)
@@ -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;
This page took 0.05781 seconds and 4 git commands to generate.