usbcore: fix compile error with CONFIG_USB_SUSPEND=n
A message that is not in the archive (sent off-list or not yet received): [email protected]
PATCH 1/1 usbcore: fix compile error with CONFIG_USB_SUSPEND=n
This patch (as647) fixes a small error introduced by a recent change to the USB core suspend/resume code.
---
Quoted 10 lines · Andrew Morton
Quoted 7 lines · Andrew Morton
drivers/usb/core/hub.c: In function `usb_resume_device':drivers/usb/core/hub.c:1879: warning: `status' might be used uninitialized in this functionAnd yes, with
CONFIG_USB_SUSPEND=nit is indeed buggy.Can we please tighten things up a bit over there?
This bug is still present in Greg's tree.
This should fix it.
Alan Stern
drivers/usb/core/hub.c +1 -1
@@ -1890,8 +1890,8 @@ int usb_resume_device(struct usb_device status =hub_port_resume (hdev_to_hub (udev->parent), udev->portnum, udev); } else - status =0 ;#endif + status =0 ; }else status =finish_device_resume (udev);if (status <0 )
Quoted 1 line · Alan Stern
This should fix it.
Well, a warning which in this case actually does indicate an error ... but yes, this looks right. Thanks.
- Dave
Quoted 15 lines
Index:
usb-2.6/drivers/usb/core/hub.c
===================================================================drivers/usb/core/hub.c +1
-1@@ -1890,8 +1890,8 @@ int usb_resume_device(struct usb_device status =hub_port_resume (hdev_to_hub (udev->parent), udev->portnum, udev); } else - status =0 ;#endif + status =0 ; }else status =finish_device_resume (udev);if (status <0 )