From: Laurent Pinchart Date: Mon, 14 Apr 2014 10:08:13 +0000 (+0200) Subject: USB: ohci-jz4740: Fix uninitialized variable warning X-Git-Tag: Ubuntu-snapdragon-4.4.0-1029.32~8853^2~6 X-Git-Url: https://git.proxmox.com/?a=commitdiff_plain;h=4d6b5161dba1aa1964e505d2a09bfe4e3a1a7378;p=mirror_ubuntu-zesty-kernel.git USB: ohci-jz4740: Fix uninitialized variable warning The ret variable is not initialized in all code paths of the ohci_jz4740_hub_control function. Fix it. Signed-off-by: Laurent Pinchart Acked-by: Lars-Peter Clausen Acked-by: Alan Stern Signed-off-by: Greg Kroah-Hartman --- diff --git a/drivers/usb/host/ohci-jz4740.c b/drivers/usb/host/ohci-jz4740.c index af8dc1b92d75..b34315ca6cff 100644 --- a/drivers/usb/host/ohci-jz4740.c +++ b/drivers/usb/host/ohci-jz4740.c @@ -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: