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 <stern@rowland.harvard.edu>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
This commit is contained in:
Alan Stern 2007-05-22 11:48:17 -04:00 committed by Greg Kroah-Hartman
parent dd865571d7
commit d4b7d8e802
1 changed files with 4 additions and 4 deletions

View File

@ -2421,10 +2421,10 @@ static void hub_port_connect_change(struct usb_hub *hub, int port1,
if (portchange & USB_PORT_STAT_C_CONNECTION) { if (portchange & USB_PORT_STAT_C_CONNECTION) {
status = hub_port_debounce(hub, port1); status = hub_port_debounce(hub, port1);
if (status < 0 && printk_ratelimit()) { if (status < 0) {
dev_err (hub_dev, if (printk_ratelimit())
"connect-debounce failed, port %d disabled\n", dev_err (hub_dev, "connect-debounce failed, "
port1); "port %d disabled\n", port1);
goto done; goto done;
} }
portstatus = status; portstatus = status;