aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--drivers/platform/x86/dell-laptop.c7
1 files changed, 2 insertions, 5 deletions
diff --git a/drivers/platform/x86/dell-laptop.c b/drivers/platform/x86/dell-laptop.c
index 80de0cca1dfa..834f499a6aec 100644
--- a/drivers/platform/x86/dell-laptop.c
+++ b/drivers/platform/x86/dell-laptop.c
@@ -404,7 +404,6 @@ static int dell_rfkill_set(void *data, bool blocked)
404 int disable = blocked ? 1 : 0; 404 int disable = blocked ? 1 : 0;
405 unsigned long radio = (unsigned long)data; 405 unsigned long radio = (unsigned long)data;
406 int hwswitch_bit = (unsigned long)data - 1; 406 int hwswitch_bit = (unsigned long)data - 1;
407 int ret = 0;
408 407
409 get_buffer(); 408 get_buffer();
410 dell_send_request(buffer, 17, 11); 409 dell_send_request(buffer, 17, 11);
@@ -412,17 +411,15 @@ static int dell_rfkill_set(void *data, bool blocked)
412 /* If the hardware switch controls this radio, and the hardware 411 /* If the hardware switch controls this radio, and the hardware
413 switch is disabled, don't allow changing the software state */ 412 switch is disabled, don't allow changing the software state */
414 if ((hwswitch_state & BIT(hwswitch_bit)) && 413 if ((hwswitch_state & BIT(hwswitch_bit)) &&
415 !(buffer->output[1] & BIT(16))) { 414 !(buffer->output[1] & BIT(16)))
416 ret = -EINVAL;
417 goto out; 415 goto out;
418 }
419 416
420 buffer->input[0] = (1 | (radio<<8) | (disable << 16)); 417 buffer->input[0] = (1 | (radio<<8) | (disable << 16));
421 dell_send_request(buffer, 17, 11); 418 dell_send_request(buffer, 17, 11);
422 419
423out: 420out:
424 release_buffer(); 421 release_buffer();
425 return ret; 422 return 0;
426} 423}
427 424
428static void dell_rfkill_update_sw_state(struct rfkill *rfkill, int radio, 425static void dell_rfkill_update_sw_state(struct rfkill *rfkill, int radio,