Commit b3c8e93f authored by Ping Cheng's avatar Ping Cheng Committed by Jiri Kosina

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: default avatarPing Cheng <pingc@wacom.com>
Reviewed-by: default avatarBenjamin Tissoires <benjamin.tissoires@redhat.com>
Signed-off-by: default avatarJiri Kosina <jkosina@suse.cz>
parent fefb391f
...@@ -2405,7 +2405,7 @@ int wacom_setup_pad_input_capabilities(struct input_dev *input_dev, ...@@ -2405,7 +2405,7 @@ int wacom_setup_pad_input_capabilities(struct input_dev *input_dev,
case INTUOSPS: case INTUOSPS:
/* touch interface does not have the pad device */ /* touch interface does not have the pad device */
if (features->device_type != BTN_TOOL_PEN) if (features->device_type != BTN_TOOL_PEN)
return 1; return -ENODEV;
for (i = 0; i < 7; i++) for (i = 0; i < 7; i++)
__set_bit(BTN_0 + i, input_dev->keybit); __set_bit(BTN_0 + i, input_dev->keybit);
...@@ -2450,7 +2450,7 @@ int wacom_setup_pad_input_capabilities(struct input_dev *input_dev, ...@@ -2450,7 +2450,7 @@ int wacom_setup_pad_input_capabilities(struct input_dev *input_dev,
case BAMBOO_PT: case BAMBOO_PT:
/* pad device is on the touch interface */ /* pad device is on the touch interface */
if (features->device_type != BTN_TOOL_FINGER) if (features->device_type != BTN_TOOL_FINGER)
return 1; return -ENODEV;
__clear_bit(ABS_MISC, input_dev->absbit); __clear_bit(ABS_MISC, input_dev->absbit);
...@@ -2463,7 +2463,7 @@ int wacom_setup_pad_input_capabilities(struct input_dev *input_dev, ...@@ -2463,7 +2463,7 @@ int wacom_setup_pad_input_capabilities(struct input_dev *input_dev,
default: default:
/* no pad supported */ /* no pad supported */
return 1; return -ENODEV;
} }
return 0; return 0;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment