aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/hid
diff options
context:
space:
mode:
authorPing Cheng <pinglinux@gmail.com>2014-11-18 16:27:48 -0500
committerJiri Kosina <jkosina@suse.cz>2014-11-20 11:28:42 -0500
commitb3c8e93f99a7f9453be54549ae362b603c42188c (patch)
tree246f3c6b371b2defa2e5f1b5306ef281687b676b /drivers/hid
parentfefb391f8c15900477432a29d9c3527dd66a8415 (diff)
HID: wacom - return ENODEV for failed wacom_setup_pad_input_capabilities
ENODEV indicates no device is added. Hence, the associated pad input device is simply freed. Signed-off-by: Ping Cheng <pingc@wacom.com> Reviewed-by: Benjamin Tissoires <benjamin.tissoires@redhat.com> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
Diffstat (limited to 'drivers/hid')
-rw-r--r--drivers/hid/wacom_wac.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/hid/wacom_wac.c b/drivers/hid/wacom_wac.c
index 104829524bcd..63821c0e8207 100644
--- a/drivers/hid/wacom_wac.c
+++ b/drivers/hid/wacom_wac.c
@@ -2405,7 +2405,7 @@ int wacom_setup_pad_input_capabilities(struct input_dev *input_dev,
2405 case INTUOSPS: 2405 case INTUOSPS:
2406 /* touch interface does not have the pad device */ 2406 /* touch interface does not have the pad device */
2407 if (features->device_type != BTN_TOOL_PEN) 2407 if (features->device_type != BTN_TOOL_PEN)
2408 return 1; 2408 return -ENODEV;
2409 2409
2410 for (i = 0; i < 7; i++) 2410 for (i = 0; i < 7; i++)
2411 __set_bit(BTN_0 + i, input_dev->keybit); 2411 __set_bit(BTN_0 + i, input_dev->keybit);
@@ -2450,7 +2450,7 @@ int wacom_setup_pad_input_capabilities(struct input_dev *input_dev,
2450 case BAMBOO_PT: 2450 case BAMBOO_PT:
2451 /* pad device is on the touch interface */ 2451 /* pad device is on the touch interface */
2452 if (features->device_type != BTN_TOOL_FINGER) 2452 if (features->device_type != BTN_TOOL_FINGER)
2453 return 1; 2453 return -ENODEV;
2454 2454
2455 __clear_bit(ABS_MISC, input_dev->absbit); 2455 __clear_bit(ABS_MISC, input_dev->absbit);
2456 2456
@@ -2463,7 +2463,7 @@ int wacom_setup_pad_input_capabilities(struct input_dev *input_dev,
2463 2463
2464 default: 2464 default:
2465 /* no pad supported */ 2465 /* no pad supported */
2466 return 1; 2466 return -ENODEV;
2467 } 2467 }
2468 return 0; 2468 return 0;
2469} 2469}