Skip to content

Commit

Permalink
USB: pxa27x_udc - Fix Oops
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
karl beldan authored and Greg Kroah-Hartman committed May 20, 2008
1 parent 1b2d23d commit 3f88662
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion drivers/usb/gadget/pxa27x_udc.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}

/**
Expand Down

0 comments on commit 3f88662

Please sign in to comment.