Skip to contentSkip to conversation

usb: xhci: remove the code build warning

PATCH New Mathias Nyman 1 participant 1 message Jun 21, 2018

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 3/5 usb: xhci: remove the code build warning

From: Dongjiu Geng <[email protected]>

Initialize the 'err' variate to remove the build warning, the warning is shown as below:

drivers/usb/host/xhci-tegra.c: In function 'tegra_xusb_mbox_thread':
drivers/usb/host/xhci-tegra.c:552:6: warning: 'err' may be used uninitialized in this function [-Wuninitialized] drivers/usb/host/xhci-tegra.c:482:6: note: 'err' was declared here

Fixes e84fce0f8837 ("usb: xhci: Add NVIDIA Tegra XUSB controller driver")
---
 drivers/usb/host/xhci-tegra.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/usb/host/xhci-tegra.c +1 -1
index a8c1d07..d50549f 100644
@@ -481,7 +481,7 @@ static void tegra_xusb_mbox_handle(struct tegra_xusb *tegra,
 	unsigned long mask;
 	unsigned int port;
 	bool idle, enable;
-	int err;
+	int err = 0;
 
 	memset(&rsp, 0, sizeof(rsp));