X-Git-Url: https://git.openpandora.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=drivers%2Fusb%2Fmisc%2Fidmouse.c;h=848322e02c001d0ca4c011c6306c0cb7ac9a3499;hb=0cbbe6dafb1835e60d7cecfd795e6efb7e9cc337;hp=515b67fffab10480f2d53235590a5091fc7cbe22;hpb=b32fc0a0629bf5894b35f33554c118aacfd0d1e2;p=pandora-kernel.git diff --git a/drivers/usb/misc/idmouse.c b/drivers/usb/misc/idmouse.c index 515b67fffab1..848322e02c00 100644 --- a/drivers/usb/misc/idmouse.c +++ b/drivers/usb/misc/idmouse.c @@ -346,6 +346,9 @@ static int idmouse_probe(struct usb_interface *interface, if (iface_desc->desc.bInterfaceClass != 0x0A) return -ENODEV; + if (iface_desc->desc.bNumEndpoints < 1) + return -ENODEV; + /* allocate memory for our device state and initialize it */ dev = kzalloc(sizeof(*dev), GFP_KERNEL); if (dev == NULL)