OSDN Git Service

staging: gigaset: fix general protection fault on probe
[sagit-ice-cold/kernel_xiaomi_msm8998.git] / drivers / isdn / gigaset / usb-gigaset.c
index 5f306e2..20591f6 100644 (file)
@@ -688,6 +688,11 @@ static int gigaset_probe(struct usb_interface *interface,
                return -ENODEV;
        }
 
+       if (hostif->desc.bNumEndpoints < 2) {
+               dev_err(&interface->dev, "missing endpoints\n");
+               return -ENODEV;
+       }
+
        dev_info(&udev->dev, "%s: Device matched ... !\n", __func__);
 
        /* allocate memory for our device state and initialize it */