Skip to content

Commit

Permalink
platform/x86: toshiba_bluetooth: Decouple an error checking status code
Browse files Browse the repository at this point in the history
This patch simply decouples the error checking of the ACPI status and
the actual BT status, as those two were nested in an if/else check, but
are completely unrelated.

Signed-off-by: Azael Avalos <coproscefalo@gmail.com>
Signed-off-by: Darren Hart <dvhart@linux.intel.com>
  • Loading branch information
Azael Avalos authored and Darren Hart committed Sep 23, 2016
1 parent baae5f9 commit 28e476d
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion drivers/platform/x86/toshiba_bluetooth.c
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,9 @@ static int toshiba_bluetooth_present(acpi_handle handle)
if (ACPI_FAILURE(result)) {
pr_err("ACPI call to query Bluetooth presence failed\n");
return -ENXIO;
} else if (!bt_present) {
}

if (!bt_present) {
pr_info("Bluetooth device not present\n");
return -ENODEV;
}
Expand Down

0 comments on commit 28e476d

Please sign in to comment.