aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNathan Chancellor <natechancellor@gmail.com>2017-01-26 22:50:30 -0700
committerMister Oyster <oysterized@gmail.com>2017-04-13 12:32:12 +0200
commit9ec19608e3df363eefbe06848ff79208a5cc5c20 (patch)
tree120315f477d4612e97f9d4363b7b46620ccd77c9
parent9f45e41f9d743ed65dd5379e0af4d643d6a710aa (diff)
drivers: usb: core: hub: fix maybe-uninitialized warning
drivers/usb/core/hub.c: In function 'usb_port_resume': drivers/usb/core/hub.c:3451:11: warning: 'portstatus' may be used uninitialized in this function [-Wmaybe-uninitialized] status = check_port_resume_type(udev, ^~~~~~~~~~~~~~~~~~~~~~~~~~~~ hub, port1, status, portchange, portstatus); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ drivers/usb/core/hub.c:3451:11: warning: 'portchange' may be used uninitialized in this function [-Wmaybe-uninitialized] Signed-off-by: Nathan Chancellor <natechancellor@gmail.com>
-rw-r--r--drivers/usb/core/hub.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/usb/core/hub.c b/drivers/usb/core/hub.c
index cc8ec875d..921b05c24 100644
--- a/drivers/usb/core/hub.c
+++ b/drivers/usb/core/hub.c
@@ -3701,7 +3701,7 @@ int usb_port_resume(struct usb_device *udev, pm_message_t msg)
struct usb_port *port_dev = hub->ports[udev->portnum - 1];
int port1 = udev->portnum;
int status;
- u16 portchange, portstatus;
+ u16 portchange = 0, portstatus = 0;
#if defined(CONFIG_USB_MTK_OTG) && defined(CONFIG_USBIF_COMPLIANCE)
status = hub_port_status(hub, port1, &portstatus, &portchange);