Skip to content

Commit

Permalink
USB: fix ratelimit call semantics
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Alan Stern authored and Greg Kroah-Hartman committed May 23, 2007
1 parent dd86557 commit d4b7d8e
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions drivers/usb/core/hub.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit d4b7d8e

Please sign in to comment.