]> git.kernelconcepts.de Git - karo-tx-linux.git/blobdiff - drivers/hid/wacom_sys.c
Merge branch 'for-4.3/wacom' into for-next
[karo-tx-linux.git] / drivers / hid / wacom_sys.c
index 0c3c5677608110ff10ddedd142ecdc28764a6101..7c785b027d0bbd53eed9c13b523e6625094a5aaf 100644 (file)
@@ -335,7 +335,7 @@ static int wacom_set_device_mode(struct hid_device *hdev, int report_id,
                if (error >= 0)
                        error = wacom_get_report(hdev, HID_FEATURE_REPORT,
                                                 rep_data, length, 1);
-       } while ((error < 0 || rep_data[1] != mode) && limit++ < WAC_MSG_RETRIES);
+       } while (error >= 0 && rep_data[1] != mode && limit++ < WAC_MSG_RETRIES);
 
        kfree(rep_data);