From 5b1dc209d68c5fd223b7bd865a5cabad043dbc07 Mon Sep 17 00:00:00 2001 From: Peter Chen Date: Tue, 19 Aug 2014 08:56:21 +0800 Subject: [PATCH] usb: core: fix below build warning linux-2.6/drivers/usb/core/hub.c: In function 'usb_disconnect': linux-2.6/drivers/usb/core/hub.c:2110: warning: 'hub' may be used uninitialized in this function linux-2.6/drivers/usb/core/hub.c:2111: warning: 'port1' may be used uninitialized in this function Signed-off-by: Peter Chen Acked-by: Alan Stern Signed-off-by: Greg Kroah-Hartman --- drivers/usb/core/hub.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/usb/core/hub.c b/drivers/usb/core/hub.c index e0eaeb8697bb..97deb8e6b594 100644 --- a/drivers/usb/core/hub.c +++ b/drivers/usb/core/hub.c @@ -2107,8 +2107,8 @@ void usb_disconnect(struct usb_device **pdev) { struct usb_port *port_dev = NULL; struct usb_device *udev = *pdev; - struct usb_hub *hub; - int port1; + struct usb_hub *hub = NULL; + int port1 = 1; /* mark the device as inactive, so any further urb submissions for * this device (and any of its children) will fail immediately. -- 2.20.1