* [PATCH] usbcore: fix compile error with CONFIG_USB_SUSPEND=n
[not found] <20060131214432.566abcff.akpm@osdl.org>
@ 2006-02-01 15:47 ` Alan Stern
2006-02-01 16:01 ` David Brownell
0 siblings, 1 reply; 2+ messages in thread
From: Alan Stern @ 2006-02-01 15:47 UTC (permalink / raw)
To: Andrew Morton
Cc: David Brownell, Greg KH, Kernel development list, USB development list
This patch (as647) fixes a small error introduced by a recent change to
the USB core suspend/resume code.
Signed-off-by: Alan Stern <stern@rowland.harvard.edu>
---
On Tue, 31 Jan 2006, Andrew Morton wrote:
> Andrew Morton <akpm@osdl.org> wrote:
> >
> > drivers/usb/core/hub.c: In function `usb_resume_device':
> > drivers/usb/core/hub.c:1879: warning: `status' might be used uninitialized in this function
> >
> > And yes, with CONFIG_USB_SUSPEND=n it 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
Index: usb-2.6/drivers/usb/core/hub.c
===================================================================
--- usb-2.6.orig/drivers/usb/core/hub.c
+++ usb-2.6/drivers/usb/core/hub.c
@@ -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)
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [PATCH] usbcore: fix compile error with CONFIG_USB_SUSPEND=n
2006-02-01 15:47 ` [PATCH] usbcore: fix compile error with CONFIG_USB_SUSPEND=n Alan Stern
@ 2006-02-01 16:01 ` David Brownell
0 siblings, 0 replies; 2+ messages in thread
From: David Brownell @ 2006-02-01 16:01 UTC (permalink / raw)
To: Alan Stern
Cc: Andrew Morton, Greg KH, Kernel development list, USB development list
On Wednesday 01 February 2006 7:47 am, Alan Stern wrote:
> This should fix it.
Well, a warning which in this case actually does indicate an
error ... but yes, this looks right. Thanks.
- Dave
> Index: usb-2.6/drivers/usb/core/hub.c
> ===================================================================
> --- usb-2.6.orig/drivers/usb/core/hub.c
> +++ usb-2.6/drivers/usb/core/hub.c
> @@ -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)
>
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2006-02-01 16:02 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
[not found] <20060131214432.566abcff.akpm@osdl.org>
2006-02-01 15:47 ` [PATCH] usbcore: fix compile error with CONFIG_USB_SUSPEND=n Alan Stern
2006-02-01 16:01 ` David Brownell
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.