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>
        err = wait_on_bit_timeout(&data->flags, BTUSB_DOWNLOADING,
                                  TASK_INTERRUPTIBLE,
                                  msecs_to_jiffies(5000));
-       if (err == 1) {
+       if (err == -EINTR) {
                BT_ERR("%s: Firmware loading interrupted", hdev->name);
-               err = -EINTR;
                goto done;
        }
 
                                  TASK_INTERRUPTIBLE,
                                  msecs_to_jiffies(1000));
 
-       if (err == 1) {
+       if (err == -EINTR) {
                BT_ERR("%s: Device boot interrupted", hdev->name);
                return -EINTR;
        }
 
                                  TASK_INTERRUPTIBLE,
                                  msecs_to_jiffies(1000));
 
-       if (err == 1) {
+       if (err == -EINTR) {
                bt_dev_err(hu->hdev, "Device boot interrupted");
                return -EINTR;
        }
                                  TASK_INTERRUPTIBLE,
                                  msecs_to_jiffies(1000));
 
-       if (err == 1) {
+       if (err == -EINTR) {
                bt_dev_err(hu->hdev, "LPM transaction interrupted");
                return -EINTR;
        }
        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;