aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/platform/x86/hp-wmi.c
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2013-09-15 17:42:59 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2013-09-15 17:42:59 -0400
commitcd619e21ea468b02af9eeed75eae2307ec7de1cb (patch)
tree7d9febcbea96480d9b9f9ef291ad45ada3eac978 /drivers/platform/x86/hp-wmi.c
parent0375ec5899a37e80af7be8e813548df3292325ff (diff)
parent5c07eae979dfb596141c6885e5f5ecf1cd22cad3 (diff)
Merge branch 'for_linus' of git://cavan.codon.org.uk/platform-drivers-x86
Pull x86 platform updates from Matthew Garrett: "Nothing amazing here, almost entirely cleanups and minor bugfixes and one bit of hardware enablement in the amilo-rfkill driver" * 'for_linus' of git://cavan.codon.org.uk/platform-drivers-x86: platform/x86: panasonic-laptop: reuse module_acpi_driver samsung-laptop: fix config build error platform: x86: remove unnecessary platform_set_drvdata() amilo-rfkill: Enable using amilo-rfkill with the FSC Amilo L1310. wmi: parse_wdg() should return kernel error codes hp_wmi: Fix unregister order in hp_wmi_rfkill_setup() platform: replace strict_strto*() with kstrto*() x86: irst: use module_acpi_driver to simplify the code x86: smartconnect: use module_acpi_driver to simplify the code platform samsung-q10: use ACPI instead of direct EC calls thinkpad_acpi: add the ability setting TPACPI_LED_NONE by quirk thinkpad_acpi: return -NODEV while operating uninitialized LEDs
Diffstat (limited to 'drivers/platform/x86/hp-wmi.c')
-rw-r--r--drivers/platform/x86/hp-wmi.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/drivers/platform/x86/hp-wmi.c b/drivers/platform/x86/hp-wmi.c
index d6970f47ae72..1c86fa0857c8 100644
--- a/drivers/platform/x86/hp-wmi.c
+++ b/drivers/platform/x86/hp-wmi.c
@@ -725,7 +725,7 @@ static int hp_wmi_rfkill_setup(struct platform_device *device)
725 (void *) HPWMI_WWAN); 725 (void *) HPWMI_WWAN);
726 if (!wwan_rfkill) { 726 if (!wwan_rfkill) {
727 err = -ENOMEM; 727 err = -ENOMEM;
728 goto register_gps_error; 728 goto register_bluetooth_error;
729 } 729 }
730 rfkill_init_sw_state(wwan_rfkill, 730 rfkill_init_sw_state(wwan_rfkill,
731 hp_wmi_get_sw_state(HPWMI_WWAN)); 731 hp_wmi_get_sw_state(HPWMI_WWAN));
@@ -733,7 +733,7 @@ static int hp_wmi_rfkill_setup(struct platform_device *device)
733 hp_wmi_get_hw_state(HPWMI_WWAN)); 733 hp_wmi_get_hw_state(HPWMI_WWAN));
734 err = rfkill_register(wwan_rfkill); 734 err = rfkill_register(wwan_rfkill);
735 if (err) 735 if (err)
736 goto register_wwan_err; 736 goto register_wwan_error;
737 } 737 }
738 738
739 if (wireless & 0x8) { 739 if (wireless & 0x8) {
@@ -743,7 +743,7 @@ static int hp_wmi_rfkill_setup(struct platform_device *device)
743 (void *) HPWMI_GPS); 743 (void *) HPWMI_GPS);
744 if (!gps_rfkill) { 744 if (!gps_rfkill) {
745 err = -ENOMEM; 745 err = -ENOMEM;
746 goto register_bluetooth_error; 746 goto register_wwan_error;
747 } 747 }
748 rfkill_init_sw_state(gps_rfkill, 748 rfkill_init_sw_state(gps_rfkill,
749 hp_wmi_get_sw_state(HPWMI_GPS)); 749 hp_wmi_get_sw_state(HPWMI_GPS));
@@ -755,16 +755,16 @@ static int hp_wmi_rfkill_setup(struct platform_device *device)
755 } 755 }
756 756
757 return 0; 757 return 0;
758register_wwan_err:
759 rfkill_destroy(wwan_rfkill);
760 wwan_rfkill = NULL;
761 if (gps_rfkill)
762 rfkill_unregister(gps_rfkill);
763register_gps_error: 758register_gps_error:
764 rfkill_destroy(gps_rfkill); 759 rfkill_destroy(gps_rfkill);
765 gps_rfkill = NULL; 760 gps_rfkill = NULL;
766 if (bluetooth_rfkill) 761 if (bluetooth_rfkill)
767 rfkill_unregister(bluetooth_rfkill); 762 rfkill_unregister(bluetooth_rfkill);
763register_wwan_error:
764 rfkill_destroy(wwan_rfkill);
765 wwan_rfkill = NULL;
766 if (gps_rfkill)
767 rfkill_unregister(gps_rfkill);
768register_bluetooth_error: 768register_bluetooth_error:
769 rfkill_destroy(bluetooth_rfkill); 769 rfkill_destroy(bluetooth_rfkill);
770 bluetooth_rfkill = NULL; 770 bluetooth_rfkill = NULL;