usb: dwc2: gadget: fix below build warning
authorPeter Chen <peter.chen@freescale.com>
Tue, 19 Aug 2014 00:56:20 +0000 (08:56 +0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 19 Aug 2014 16:28:53 +0000 (11:28 -0500)
linux-2.6/drivers/usb/dwc2/gadget.c: In function 's3c_hsotg_irq_enumdone':
linux-2.6/drivers/usb/dwc2/gadget.c:1904: warning: 'ep_mps' may be used uninitialized in this function

Acked-by: Paul Zimmerman <Paul.Zimmerman@synopsys.com>
Signed-off-by: Peter Chen <peter.chen@freescale.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/usb/dwc2/gadget.c

index 0ba9c33..2a6f76b 100644 (file)
@@ -1901,7 +1901,7 @@ static void s3c_hsotg_epint(struct s3c_hsotg *hsotg, unsigned int idx,
 static void s3c_hsotg_irq_enumdone(struct s3c_hsotg *hsotg)
 {
        u32 dsts = readl(hsotg->regs + DSTS);
-       int ep0_mps = 0, ep_mps;
+       int ep0_mps = 0, ep_mps = 1023;
 
        /*
         * This should signal the finish of the enumeration phase