@@ -196,7 +196,7 @@ static void usbhid_mark_busy(struct usbhid_device *usbhid)
static int usbhid_restart_out_queue(struct usbhid_device *usbhid)
{
- struct hid_device *hid = usb_get_intfdata(usbhid->intf);
+ struct hid_device *hid = usbhid->intf ? usb_get_intfdata(usbhid->intf) : NULL;
int kicked;
if (!hid)
@@ -214,7 +214,7 @@ static int usbhid_restart_out_queue(struct usbhid_device *usbhid)
static int usbhid_restart_ctrl_queue(struct usbhid_device *usbhid)
{
- struct hid_device *hid = usb_get_intfdata(usbhid->intf);
+ struct hid_device *hid = usbhid->intf ? usb_get_intfdata(usbhid->intf) : NULL;
int kicked;
WARN_ON(hid == NULL);