diff options
| author | Nathan Chancellor <natechancellor@gmail.com> | 2017-01-26 22:50:30 -0700 |
|---|---|---|
| committer | Mister Oyster <oysterized@gmail.com> | 2017-04-13 12:32:12 +0200 |
| commit | 9ec19608e3df363eefbe06848ff79208a5cc5c20 (patch) | |
| tree | 120315f477d4612e97f9d4363b7b46620ccd77c9 /drivers/usb/core | |
| parent | 9f45e41f9d743ed65dd5379e0af4d643d6a710aa (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>
Diffstat (limited to 'drivers/usb/core')
| -rw-r--r-- | drivers/usb/core/hub.c | 2 |
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); |
