]> git.kernelconcepts.de Git - karo-tx-linux.git/commit
usb: check usb_hub_to_struct_hub() return value
authorMathias Nyman <mathias.nyman@linux.intel.com>
Tue, 18 Jun 2013 14:28:48 +0000 (17:28 +0300)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 18 Jun 2013 18:02:04 +0000 (11:02 -0700)
commit41341261aa1707b49f937ba2c20d1a0daa5afac3
tree7f7e80ab0396c7b0381013461d94ef9af852168a
parent025f880cb2e4d7218d0422d4b07bea1a68959c38
usb: check usb_hub_to_struct_hub() return value

usb_hub_to_struct_hub() can return NULL in some unlikely cases.
Add checks where appropriate, or pass the hub pointer as an additional
argument if it's known to be valid.

The places it makes sense to check usb_hub_to_struct_hub()
are picked based on feedback from Alan Stern.

Signed-off-by: Mathias Nyman <mathias.nyman@linux.intel.com>
Acked-by: Alan Stern <stern@rowland.harvard.edu>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/usb/core/hub.c
drivers/usb/core/hub.h
drivers/usb/core/port.c