]> git.karo-electronics.de Git - karo-tx-linux.git/commit
usb: musb: avoid NULL pointer dereference
authorFelipe Balbi <balbi@ti.com>
Tue, 25 Feb 2014 16:58:43 +0000 (10:58 -0600)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 6 May 2014 14:59:33 +0000 (07:59 -0700)
commitc72590ffdf9cf3467e8cd9040b44d773c1cccda2
tree5fd180c858c7844cbf12f3db7cd0138a67bc0d1e
parent31cbda45ef836067bae9ca4427926671371b98ff
usb: musb: avoid NULL pointer dereference

commit eee3f15d5f1f4f0c283dd4db67dc1b874a2852d1 upstream.

instead of relying on the otg pointer, which
can be NULL in certain cases, we can use the
gadget and host pointers we already hold inside
struct musb.

Tested-by: Tony Lindgren <tony@atomide.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/usb/musb/musb_core.c