]> www.infradead.org Git - users/jedix/linux-maple.git/commit
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)
committerMaxim Uvarov <maxim.uvarov@oracle.com>
Thu, 8 Dec 2011 19:18:06 +0000 (11:18 -0800)
commit091bc82915a1662ef2bbacefda1f65ba74291881
tree80b59e4180f38dc2b94cefa1bf06141024ff2d60
parent084c145def5a0b644e59035904fda7440cbd35fd
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