From: karl beldan Date: Fri, 16 May 2008 09:30:22 +0000 (+0200) Subject: USB: pxa27x_udc - Fix Oops X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=3f886620742edd4e7e037d7d9349be69df0ce59b;p=GitHub%2FLineageOS%2Fandroid_kernel_samsung_universal7580.git 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 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); } /**