diff options
author | karl beldan <karl.beldan@gmail.com> | 2008-05-16 11:30:22 +0200 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2008-05-20 14:14:14 -0700 |
commit | 3f886620742edd4e7e037d7d9349be69df0ce59b (patch) | |
tree | dcaa7e3d78cec7b859a696c73b6594be5031cb36 /drivers/usb | |
parent | 1b2d23d49cf4b4b1fe3b43d3ffd6077fc4ee9ac6 (diff) | |
download | blackbird-op-linux-3f886620742edd4e7e037d7d9349be69df0ce59b.tar.gz blackbird-op-linux-3f886620742edd4e7e037d7d9349be69df0ce59b.zip |
USB: pxa27x_udc - Fix Oops
udc_disable oopses dereferencing udc_command.
Signed-off-by: Karl Beldan <karl.beldan@gmail.com>
Acked-by: Robert Jarzmik <rjarzmik@free.fr>
Acked-by: David Brownell <dbrownell@users.sourceforge.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers/usb')
-rw-r--r-- | drivers/usb/gadget/pxa27x_udc.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/usb/gadget/pxa27x_udc.c b/drivers/usb/gadget/pxa27x_udc.c index 499b7a23f351..e02bfd4df3a6 100644 --- a/drivers/usb/gadget/pxa27x_udc.c +++ b/drivers/usb/gadget/pxa27x_udc.c @@ -1526,7 +1526,8 @@ static void udc_disable(struct pxa_udc *udc) ep0_idle(udc); udc->gadget.speed = USB_SPEED_UNKNOWN; - udc->mach->udc_command(PXA2XX_UDC_CMD_DISCONNECT); + if (udc->mach->udc_command) + udc->mach->udc_command(PXA2XX_UDC_CMD_DISCONNECT); } /** |