]> git.karo-electronics.de Git - linux-beck.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)
committerSarah Sharp <sarah.a.sharp@linux.intel.com>
Mon, 15 Aug 2011 16:22:40 +0000 (09:22 -0700)
commit8a9af4fdf6d5eeb3200a088354d266a87e8260b0
tree697e4a7c0558d108ee31cc9ad04631ad6bbc6284
parent585df1d90cb07a02ca6c7a7d339e56e46d50dafb
USB: Avoid NULL pointer deref in usb_hcd_alloc_bandwidth.

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>
drivers/usb/core/hcd.c