summaryrefslogtreecommitdiffstats
path: root/drivers/watchdog/pcwd_usb.c
diff options
context:
space:
mode:
authorGreg Kroah-Hartman2017-05-22 08:56:55 +0200
committerGreg Kroah-Hartman2017-05-22 08:56:55 +0200
commitb4a338d2b3cafa1be68d4e1903203c7e08a38ee5 (patch)
tree069f3753af1cda34c36a7627000ab46ef5c51c83 /drivers/watchdog/pcwd_usb.c
parentmisc: sram-exec: Use aligned fncpy instead of memcpy (diff)
parentLinux 4.12-rc2 (diff)
downloadkernel-qcow2-linux-b4a338d2b3cafa1be68d4e1903203c7e08a38ee5.tar.gz
kernel-qcow2-linux-b4a338d2b3cafa1be68d4e1903203c7e08a38ee5.tar.xz
kernel-qcow2-linux-b4a338d2b3cafa1be68d4e1903203c7e08a38ee5.zip
Merge 4.12-rc2 into char-misc-next
We want the fixes in here as well to handle merge issues. Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/watchdog/pcwd_usb.c')
-rw-r--r--drivers/watchdog/pcwd_usb.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/watchdog/pcwd_usb.c b/drivers/watchdog/pcwd_usb.c
index 99ebf6ea3de6..5615f4013924 100644
--- a/drivers/watchdog/pcwd_usb.c
+++ b/drivers/watchdog/pcwd_usb.c
@@ -630,6 +630,9 @@ static int usb_pcwd_probe(struct usb_interface *interface,
return -ENODEV;
}
+ if (iface_desc->desc.bNumEndpoints < 1)
+ return -ENODEV;
+
/* check out the endpoint: it has to be Interrupt & IN */
endpoint = &iface_desc->endpoint[0].desc;