USB: ohci-jz4740: Fix uninitialized variable warning
authorLaurent Pinchart <laurent.pinchart@ideasonboard.com>
Mon, 14 Apr 2014 10:08:13 +0000 (12:08 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 16 Apr 2014 20:59:40 +0000 (13:59 -0700)
The ret variable is not initialized in all code paths of the
ohci_jz4740_hub_control function. Fix it.

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Acked-by: Lars-Peter Clausen <lars@metafoo.de>
Acked-by: Alan Stern <stern@rowland.harvard.edu>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/usb/host/ohci-jz4740.c

index af8dc1b92d7550fb558d22ae259c78e244bc15ee..b34315ca6cffcef5dc443a61a1070ec7b2d9f073 100644 (file)
@@ -82,7 +82,7 @@ static int ohci_jz4740_hub_control(struct usb_hcd *hcd, u16 typeReq, u16 wValue,
        u16 wIndex, char *buf, u16 wLength)
 {
        struct jz4740_ohci_hcd *jz4740_ohci = hcd_to_jz4740_hcd(hcd);
-       int ret;
+       int ret = 0;
 
        switch (typeReq) {
        case SetHubFeature: