提交 3f886620 编写于 作者: K karl beldan 提交者: Greg Kroah-Hartman

USB: pxa27x_udc - Fix Oops

udc_disable oopses dereferencing udc_command.
Signed-off-by: NKarl Beldan <karl.beldan@gmail.com>
Acked-by: NRobert Jarzmik <rjarzmik@free.fr>
Acked-by: NDavid Brownell <dbrownell@users.sourceforge.net>
Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
上级 1b2d23d4
......@@ -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);
}
/**
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册