From: Alan Stern Date: Tue, 22 May 2007 15:48:17 +0000 (-0400) Subject: USB: fix ratelimit call semantics X-Git-Tag: v2.6.22-rc3~91^2~4 X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=d4b7d8e8024a33d9d1f916379eaee7aa945a7c48;p=linux-2.6 USB: fix ratelimit call semantics 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 --- diff --git a/drivers/usb/core/hub.c b/drivers/usb/core/hub.c index 6a6e4f8c69..caaa46f2de 100644 --- a/drivers/usb/core/hub.c +++ b/drivers/usb/core/hub.c @@ -2421,10 +2421,10 @@ static void hub_port_connect_change(struct usb_hub *hub, int port1, 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;