diff options
Diffstat (limited to 'drivers/platform/x86')
-rw-r--r-- | drivers/platform/x86/hp-wmi.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/drivers/platform/x86/hp-wmi.c b/drivers/platform/x86/hp-wmi.c index f6a1c37af9cc..45b2bbe6d835 100644 --- a/drivers/platform/x86/hp-wmi.c +++ b/drivers/platform/x86/hp-wmi.c | |||
@@ -587,14 +587,17 @@ static int __devinit hp_wmi_rfkill_setup(struct platform_device *device) | |||
587 | return 0; | 587 | return 0; |
588 | register_wwan_err: | 588 | register_wwan_err: |
589 | rfkill_destroy(wwan_rfkill); | 589 | rfkill_destroy(wwan_rfkill); |
590 | wwan_rfkill = NULL; | ||
590 | if (bluetooth_rfkill) | 591 | if (bluetooth_rfkill) |
591 | rfkill_unregister(bluetooth_rfkill); | 592 | rfkill_unregister(bluetooth_rfkill); |
592 | register_bluetooth_error: | 593 | register_bluetooth_error: |
593 | rfkill_destroy(bluetooth_rfkill); | 594 | rfkill_destroy(bluetooth_rfkill); |
595 | bluetooth_rfkill = NULL; | ||
594 | if (wifi_rfkill) | 596 | if (wifi_rfkill) |
595 | rfkill_unregister(wifi_rfkill); | 597 | rfkill_unregister(wifi_rfkill); |
596 | register_wifi_error: | 598 | register_wifi_error: |
597 | rfkill_destroy(wifi_rfkill); | 599 | rfkill_destroy(wifi_rfkill); |
600 | wifi_rfkill = NULL; | ||
598 | return err; | 601 | return err; |
599 | } | 602 | } |
600 | 603 | ||
@@ -602,6 +605,11 @@ static int __devinit hp_wmi_bios_setup(struct platform_device *device) | |||
602 | { | 605 | { |
603 | int err; | 606 | int err; |
604 | 607 | ||
608 | /* clear detected rfkill devices */ | ||
609 | wifi_rfkill = NULL; | ||
610 | bluetooth_rfkill = NULL; | ||
611 | wwan_rfkill = NULL; | ||
612 | |||
605 | err = hp_wmi_rfkill_setup(device); | 613 | err = hp_wmi_rfkill_setup(device); |
606 | if (err) | 614 | if (err) |
607 | return err; | 615 | return err; |