aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/bluetooth/hci_intel.c
diff options
context:
space:
mode:
authorBart Van Assche <bart.vanassche@sandisk.com>2016-08-11 16:02:44 -0700
committerMarcel Holtmann <marcel@holtmann.org>2016-09-19 20:19:34 +0200
commitf0a70a04ca10d07a383a89edea142e3cbab1f2ca (patch)
tree8e4fc285ff4e5c0b599a02beafaa6a876b95ef56 /drivers/bluetooth/hci_intel.c
parentBluetooth: Introduce Qualcomm WCNSS SMD based HCI driver (diff)
downloadlinux-dev-f0a70a04ca10d07a383a89edea142e3cbab1f2ca.tar.xz
linux-dev-f0a70a04ca10d07a383a89edea142e3cbab1f2ca.zip
Bluetooth: btusb, hci_intel: Fix wait_on_bit_timeout() return value checks
wait_on_bit_timeout() returns one of the following three values: * 0 to indicate success. * -EINTR to indicate that a signal has been received; * -EAGAIN to indicate timeout; Make the wait_on_bit_timeout() callers check for these values. Signed-off-by: Bart Van Assche <bart.vanassche@sandisk.com> Signed-off-by: Johan Hedberg <johan.hedberg@intel.com> Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
Diffstat (limited to 'drivers/bluetooth/hci_intel.c')
-rw-r--r--drivers/bluetooth/hci_intel.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/bluetooth/hci_intel.c b/drivers/bluetooth/hci_intel.c
index ed0a4201b551..9e271286c5e5 100644
--- a/drivers/bluetooth/hci_intel.c
+++ b/drivers/bluetooth/hci_intel.c
@@ -128,7 +128,7 @@ static int intel_wait_booting(struct hci_uart *hu)
TASK_INTERRUPTIBLE,
msecs_to_jiffies(1000));
- if (err == 1) {
+ if (err == -EINTR) {
bt_dev_err(hu->hdev, "Device boot interrupted");
return -EINTR;
}
@@ -151,7 +151,7 @@ static int intel_wait_lpm_transaction(struct hci_uart *hu)
TASK_INTERRUPTIBLE,
msecs_to_jiffies(1000));
- if (err == 1) {
+ if (err == -EINTR) {
bt_dev_err(hu->hdev, "LPM transaction interrupted");
return -EINTR;
}
@@ -813,7 +813,7 @@ static int intel_setup(struct hci_uart *hu)
err = wait_on_bit_timeout(&intel->flags, STATE_DOWNLOADING,
TASK_INTERRUPTIBLE,
msecs_to_jiffies(5000));
- if (err == 1) {
+ if (err == -EINTR) {
bt_dev_err(hdev, "Firmware loading interrupted");
err = -EINTR;
goto done;