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:55:33 +0000 (07:55 -0700)
commit6b32172a1d3cffa74067ced96612bd13658d4fcf
treedf90f386ef3fed3a0ae2192330c4bae225ff6d5e
parent0bf463e6229ba7d2da00acb72e0a25bce9447696
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