summaryrefslogtreecommitdiffstats
path: root/drivers/input/tablet/hanwang.c
diff options
context:
space:
mode:
authorGreg Kroah-Hartman2017-03-27 09:13:04 +0200
committerGreg Kroah-Hartman2017-03-27 09:13:04 +0200
commit57c0eabbd57e1a0872122525f6eeefe1f6529c33 (patch)
tree788d036bfbc9c92fb7663588033f50d2d6f5c828 /drivers/input/tablet/hanwang.c
parentdrivers, firewire: convert fw_node.ref_count from atomic_t to refcount_t (diff)
parentLinux 4.11-rc4 (diff)
downloadkernel-qcow2-linux-57c0eabbd57e1a0872122525f6eeefe1f6529c33.tar.gz
kernel-qcow2-linux-57c0eabbd57e1a0872122525f6eeefe1f6529c33.tar.xz
kernel-qcow2-linux-57c0eabbd57e1a0872122525f6eeefe1f6529c33.zip
Merge 4.11-rc4 into char-misc-next
We want the char-misc fixes in here as well. Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/input/tablet/hanwang.c')
-rw-r--r--drivers/input/tablet/hanwang.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/input/tablet/hanwang.c b/drivers/input/tablet/hanwang.c
index cd852059b99e..df4bea96d7ed 100644
--- a/drivers/input/tablet/hanwang.c
+++ b/drivers/input/tablet/hanwang.c
@@ -340,6 +340,9 @@ static int hanwang_probe(struct usb_interface *intf, const struct usb_device_id
int error;
int i;
+ if (intf->cur_altsetting->desc.bNumEndpoints < 1)
+ return -ENODEV;
+
hanwang = kzalloc(sizeof(struct hanwang), GFP_KERNEL);
input_dev = input_allocate_device();
if (!hanwang || !input_dev) {