go->hpi_ops = &go7007_usb_onboard_hpi_ops;
        go->hpi_context = usb;
 
+       ep = usb->usbdev->ep_in[4];
+       if (!ep)
+               return -ENODEV;
+
        /* Allocate the URB and buffer for receiving incoming interrupts */
        usb->intr_urb = usb_alloc_urb(0, GFP_KERNEL);
        if (usb->intr_urb == NULL)
        if (usb->intr_urb->transfer_buffer == NULL)
                goto allocfail;
 
-       ep = usb->usbdev->ep_in[4];
        if (usb_endpoint_type(&ep->desc) == USB_ENDPOINT_XFER_BULK)
                usb_fill_bulk_urb(usb->intr_urb, usb->usbdev,
                        usb_rcvbulkpipe(usb->usbdev, 4),
 
        /* Allocate the URBs and buffers for receiving the video stream */
        if (board->flags & GO7007_USB_EZUSB) {
+               if (!usb->usbdev->ep_in[6])
+                       goto allocfail;
                v_urb_len = 1024;
                video_pipe = usb_rcvbulkpipe(usb->usbdev, 6);
        } else {
+               if (!usb->usbdev->ep_in[1])
+                       goto allocfail;
                v_urb_len = 512;
                video_pipe = usb_rcvbulkpipe(usb->usbdev, 1);
        }
        /* Allocate the URBs and buffers for receiving the audio stream */
        if ((board->flags & GO7007_USB_EZUSB) &&
            (board->main_info.flags & GO7007_BOARD_HAS_AUDIO)) {
+               if (!usb->usbdev->ep_in[8])
+                       goto allocfail;
                for (i = 0; i < 8; ++i) {
                        usb->audio_urbs[i] = usb_alloc_urb(0, GFP_KERNEL);
                        if (usb->audio_urbs[i] == NULL)