From: karl beldan Date: Fri, 16 May 2008 09:30:22 +0000 (+0200) Subject: USB: pxa27x_udc - Fix Oops X-Git-Tag: v2.6.26-rc4~93^2~4 X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=3f886620742edd4e7e037d7d9349be69df0ce59b;p=linux-2.6 USB: pxa27x_udc - Fix Oops udc_disable oopses dereferencing udc_command. Signed-off-by: Karl Beldan Acked-by: Robert Jarzmik Acked-by: David Brownell Signed-off-by: Greg Kroah-Hartman --- diff --git a/drivers/usb/gadget/pxa27x_udc.c b/drivers/usb/gadget/pxa27x_udc.c index 499b7a23f3..e02bfd4df3 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); } /**