From: Will Newton Date: Tue, 12 Aug 2008 14:39:08 +0000 (+0100) Subject: fsl_usb2_udc: Remove check for udc == NULL in dr_controller_setup. X-Git-Tag: v2.6.28-rc1~254^2~27 X-Git-Url: http://pilppa.com/gitweb/?a=commitdiff_plain;h=f6e4411fe7df19493e3a2fbc2543f718f75671f6;p=linux-2.6-omap-h63xx.git fsl_usb2_udc: Remove check for udc == NULL in dr_controller_setup. Remove check for udc == NULL in dr_controller_setup. All callers of this function have already dereferenced udc at some point. Signed-off-by: Will Newton Acked-by: Li Yang Signed-off-by: Greg Kroah-Hartman --- diff --git a/drivers/usb/gadget/fsl_usb2_udc.c b/drivers/usb/gadget/fsl_usb2_udc.c index d140e1b1c90..3b96aac27af 100644 --- a/drivers/usb/gadget/fsl_usb2_udc.c +++ b/drivers/usb/gadget/fsl_usb2_udc.c @@ -185,10 +185,6 @@ static int dr_controller_setup(struct fsl_udc *udc) unsigned long timeout; #define FSL_UDC_RESET_TIMEOUT 1000 - /* before here, make sure dr_regs has been initialized */ - if (!udc) - return -EINVAL; - /* Stop and reset the usb controller */ tmp = fsl_readl(&dr_regs->usbcmd); tmp &= ~USB_CMD_RUN_STOP;