diff options
author | Jiri Kosina <jkosina@suse.cz> | 2015-09-01 15:23:13 +0200 |
---|---|---|
committer | Jiri Kosina <jkosina@suse.cz> | 2015-09-01 15:23:13 +0200 |
commit | 3e097d1271ecdff2f251a54ddfc5eaa1f9821e96 (patch) | |
tree | d84a437e8ed4c3e71521c739952ba96fd02b3781 /drivers/hid/wacom_sys.c | |
parent | 0be017120b80f0fe3da9a8239f989a27e54828f2 (diff) | |
parent | c9b57724b38d4c1555ee49418be3d76801e3327c (diff) |
Merge branches 'for-4.2/upstream-fixes-devm-fixed' and 'for-4.3/upstream' into for-linus
Diffstat (limited to 'drivers/hid/wacom_sys.c')
-rw-r--r-- | drivers/hid/wacom_sys.c | 11 |
1 files changed, 4 insertions, 7 deletions
diff --git a/drivers/hid/wacom_sys.c b/drivers/hid/wacom_sys.c index 01b937e63cf3..5cdb04472023 100644 --- a/drivers/hid/wacom_sys.c +++ b/drivers/hid/wacom_sys.c @@ -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); @@ -1149,12 +1149,9 @@ static void wacom_free_inputs(struct wacom *wacom) { struct wacom_wac *wacom_wac = &(wacom->wacom_wac); - if (wacom_wac->pen_input) - input_free_device(wacom_wac->pen_input); - if (wacom_wac->touch_input) - input_free_device(wacom_wac->touch_input); - if (wacom_wac->pad_input) - input_free_device(wacom_wac->pad_input); + input_free_device(wacom_wac->pen_input); + input_free_device(wacom_wac->touch_input); + input_free_device(wacom_wac->pad_input); wacom_wac->pen_input = NULL; wacom_wac->touch_input = NULL; wacom_wac->pad_input = NULL; |