diff options
Diffstat (limited to 'drivers/usb/core/hub.c')
-rw-r--r-- | drivers/usb/core/hub.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/drivers/usb/core/hub.c b/drivers/usb/core/hub.c index 0f9381b69a3b..f76b2e0aba9d 100644 --- a/drivers/usb/core/hub.c +++ b/drivers/usb/core/hub.c | |||
@@ -2251,7 +2251,7 @@ static int usb_enumerate_device_otg(struct usb_device *udev) | |||
2251 | /* descriptor may appear anywhere in config */ | 2251 | /* descriptor may appear anywhere in config */ |
2252 | err = __usb_get_extra_descriptor(udev->rawdescriptors[0], | 2252 | err = __usb_get_extra_descriptor(udev->rawdescriptors[0], |
2253 | le16_to_cpu(udev->config[0].desc.wTotalLength), | 2253 | le16_to_cpu(udev->config[0].desc.wTotalLength), |
2254 | USB_DT_OTG, (void **) &desc); | 2254 | USB_DT_OTG, (void **) &desc, sizeof(*desc)); |
2255 | if (err || !(desc->bmAttributes & USB_OTG_HNP)) | 2255 | if (err || !(desc->bmAttributes & USB_OTG_HNP)) |
2256 | return 0; | 2256 | return 0; |
2257 | 2257 | ||
@@ -5163,7 +5163,7 @@ static void hub_port_connect_change(struct usb_hub *hub, int port1, | |||
5163 | /* Handle notifying userspace about hub over-current events */ | 5163 | /* Handle notifying userspace about hub over-current events */ |
5164 | static void port_over_current_notify(struct usb_port *port_dev) | 5164 | static void port_over_current_notify(struct usb_port *port_dev) |
5165 | { | 5165 | { |
5166 | static char *envp[] = { NULL, NULL, NULL }; | 5166 | char *envp[3]; |
5167 | struct device *hub_dev; | 5167 | struct device *hub_dev; |
5168 | char *port_dev_path; | 5168 | char *port_dev_path; |
5169 | 5169 | ||
@@ -5187,6 +5187,7 @@ static void port_over_current_notify(struct usb_port *port_dev) | |||
5187 | if (!envp[1]) | 5187 | if (!envp[1]) |
5188 | goto exit; | 5188 | goto exit; |
5189 | 5189 | ||
5190 | envp[2] = NULL; | ||
5190 | kobject_uevent_env(&hub_dev->kobj, KOBJ_CHANGE, envp); | 5191 | kobject_uevent_env(&hub_dev->kobj, KOBJ_CHANGE, envp); |
5191 | 5192 | ||
5192 | kfree(envp[1]); | 5193 | kfree(envp[1]); |