USB: Avoid NULL pointer deref in usb_hcd_alloc_bandwidth.
authorSarah Sharp <sarah.a.sharp@linux.intel.com>
Tue, 9 Aug 2011 23:31:54 +0000 (16:31 -0700)
committerGreg Kroah-Hartman <gregkh@suse.de>
Fri, 11 Nov 2011 17:36:37 +0000 (09:36 -0800)
commitf6fad686650aaf264b2acee848825e2183a944e3
treefa75420aff3293295cbffe65cba516e0b4c96c8a
parent91c193f925d75b03f5a7f31ae1358a87af33c78a
USB: Avoid NULL pointer deref in usb_hcd_alloc_bandwidth.

commit 8a9af4fdf6d5eeb3200a088354d266a87e8260b0 upstream.

usb_ifnum_to_if() can return NULL if the USB device does not have a
configuration installed (usb_device->actconfig == NULL), or if we can't
find the interface number in the installed configuration.  Return an
error instead of crashing.

Signed-off-by: Sarah Sharp <sarah.a.sharp@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
drivers/usb/core/hcd.c