X-Git-Url: https://git.kernelconcepts.de/?a=blobdiff_plain;f=drivers%2Fusb%2Fcore%2Fhcd.c;h=c1dabf0798b1569ae2697543bb03c407967603eb;hb=99784e4ff72260ab66cc1d10b94c3db4f226653c;hp=da582f4e486b665e20ead0758d35c8ee7de23123;hpb=350732c2c19070cf646c12ef2e60c9a46968b703;p=karo-tx-linux.git diff --git a/drivers/usb/core/hcd.c b/drivers/usb/core/hcd.c index da582f4e486b..c1dabf0798b1 100644 --- a/drivers/usb/core/hcd.c +++ b/drivers/usb/core/hcd.c @@ -1775,6 +1775,8 @@ int usb_hcd_alloc_bandwidth(struct usb_device *udev, struct usb_interface *iface = usb_ifnum_to_if(udev, cur_alt->desc.bInterfaceNumber); + if (!iface) + return -EINVAL; if (iface->resetting_device) { /* * The USB core just reset the device, so the xHCI host