summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKirill Tkhai <tkhai@yandex.ru>2013-07-29 17:34:37 +0400
committerMatthew Garrett <matthew.garrett@nebula.com>2013-09-05 08:51:59 -0400
commit5b5c2b3c9b0585350d2da62bc4b990d9bf836d94 (patch)
treebee0947aaa812e43becb6c8884a6fbc4a1069b58
parent0db7fd969e567dc0e4d2a7138896d6860f9614d5 (diff)
downloadlinux-5b5c2b3c9b0585350d2da62bc4b990d9bf836d94.tar.gz
linux-5b5c2b3c9b0585350d2da62bc4b990d9bf836d94.tar.xz
hp_wmi: Fix unregister order in hp_wmi_rfkill_setup()
Register order is: wifi bluetooth wwan gps So unregister order must be: gps wwan bluetiith wifi But currently gps and wwan are swapped. Fix that. Also fix goto links. Signed-off-by: Kirill Tkhai <tkhai@yandex.ru> CC: Matthew Garrett <matthew.garrett@nebula.com> Signed-off-by: Matthew Garrett <matthew.garrett@nebula.com>
-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)
(void *) HPWMI_WWAN);
if (!wwan_rfkill) {
err = -ENOMEM;
- goto register_gps_error;
+ goto register_bluetooth_error;
}
rfkill_init_sw_state(wwan_rfkill,
hp_wmi_get_sw_state(HPWMI_WWAN));
@@ -733,7 +733,7 @@ static int hp_wmi_rfkill_setup(struct platform_device *device)
hp_wmi_get_hw_state(HPWMI_WWAN));
err = rfkill_register(wwan_rfkill);
if (err)
- goto register_wwan_err;
+ goto register_wwan_error;
}
if (wireless & 0x8) {
@@ -743,7 +743,7 @@ static int hp_wmi_rfkill_setup(struct platform_device *device)
(void *) HPWMI_GPS);
if (!gps_rfkill) {
err = -ENOMEM;
- goto register_bluetooth_error;
+ goto register_wwan_error;
}
rfkill_init_sw_state(gps_rfkill,
hp_wmi_get_sw_state(HPWMI_GPS));
@@ -755,16 +755,16 @@ static int hp_wmi_rfkill_setup(struct platform_device *device)
}
return 0;
-register_wwan_err:
- rfkill_destroy(wwan_rfkill);
- wwan_rfkill = NULL;
- if (gps_rfkill)
- rfkill_unregister(gps_rfkill);
register_gps_error:
rfkill_destroy(gps_rfkill);
gps_rfkill = NULL;
if (bluetooth_rfkill)
rfkill_unregister(bluetooth_rfkill);
+register_wwan_error:
+ rfkill_destroy(wwan_rfkill);
+ wwan_rfkill = NULL;
+ if (gps_rfkill)
+ rfkill_unregister(gps_rfkill);
register_bluetooth_error:
rfkill_destroy(bluetooth_rfkill);
bluetooth_rfkill = NULL;