aboutsummaryrefslogtreecommitdiff
path: root/drivers/usb/gadget
diff options
context:
space:
mode:
authorkarl beldan <karl.beldan@gmail.com>2008-05-16 11:30:22 +0200
committerGreg Kroah-Hartman <gregkh@suse.de>2008-05-20 14:14:14 -0700
commit3f886620742edd4e7e037d7d9349be69df0ce59b (patch)
treedcaa7e3d78cec7b859a696c73b6594be5031cb36 /drivers/usb/gadget
parent1b2d23d49cf4b4b1fe3b43d3ffd6077fc4ee9ac6 (diff)
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/gadget')
-rw-r--r--drivers/usb/gadget/pxa27x_udc.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/usb/gadget/pxa27x_udc.c b/drivers/usb/gadget/pxa27x_udc.c
index 499b7a23f35..e02bfd4df3a 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);
}
/**