diff options
-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 de91ddab0a86..f41135f2fb29 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) | |||
463 | 463 | ||
464 | return 0; | 464 | return 0; |
465 | register_wwan_err: | 465 | register_wwan_err: |
466 | rfkill_unregister(bluetooth_rfkill); | 466 | if (bluetooth_rfkill) |
467 | rfkill_unregister(bluetooth_rfkill); | ||
467 | register_bluetooth_error: | 468 | register_bluetooth_error: |
468 | rfkill_unregister(wifi_rfkill); | 469 | if (wifi_rfkill) |
470 | rfkill_unregister(wifi_rfkill); | ||
469 | add_sysfs_error: | 471 | add_sysfs_error: |
470 | cleanup_sysfs(device); | 472 | cleanup_sysfs(device); |
471 | return err; | 473 | return err; |