summaryrefslogtreecommitdiff
path: root/drivers/watchdog/pcwd_usb.c
diff options
context:
space:
mode:
authorAl Viro <viro@zeniv.linux.org.uk>2017-06-27 06:52:33 +0300
committerAl Viro <viro@zeniv.linux.org.uk>2017-06-27 06:52:33 +0300
commitca1579f6c6085ecb1838d9ee052e535682cc0e73 (patch)
tree492bbb19183f84545026f91ecf23957796be8de8 /drivers/watchdog/pcwd_usb.c
parent20dcf8e244b963a5c64cdda336d00d5169d17985 (diff)
parentf73127356f344483c82632accda2e72b7e0e5f25 (diff)
downloadlinux-ca1579f6c6085ecb1838d9ee052e535682cc0e73.tar.xz
Merge remote-tracking branch 'jl/locks-4.13' into work.misc-set_fs
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;