From stern@rowland.harvard.edu Tue May 22 09:21:28 2007 From: Alan Stern Date: Tue, 22 May 2007 11:48:17 -0400 (EDT) Subject: USB: fix ratelimit call semantics To: Greg KH Message-ID: From: Alan Stern This patch (as910) fixes a ratelimit modification so that the original error-handling path will be followed even when the log-rate limitation kicks in. Signed-off-by: Alan Stern Signed-off-by: Greg Kroah-Hartman --- drivers/usb/core/hub.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) --- a/drivers/usb/core/hub.c +++ b/drivers/usb/core/hub.c @@ -2421,10 +2421,10 @@ static void hub_port_connect_change(stru if (portchange & USB_PORT_STAT_C_CONNECTION) { status = hub_port_debounce(hub, port1); - if (status < 0 && printk_ratelimit()) { - dev_err (hub_dev, - "connect-debounce failed, port %d disabled\n", - port1); + if (status < 0) { + if (printk_ratelimit()) + dev_err (hub_dev, "connect-debounce failed, " + "port %d disabled\n", port1); goto done; } portstatus = status;