From e9e88fb7bca9f527ccdf4166a240a9023ba6ee73 Mon Sep 17 00:00:00 2001 From: Alan Stern Date: Wed, 27 Mar 2013 16:14:01 -0400 Subject: USB: avoid error messages when a device is disconnected This patch (as1673) reduces the amount of log spew from the hub driver by removing a bunch of error messages in the case where the device in question is already known to have been disconnected. Since the disconnect event itself appears in the log, there's no need for other error messages. Signed-off-by: Alan Stern Tested-by: Jenya Y Signed-off-by: Greg Kroah-Hartman --- drivers/usb/core/generic.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'drivers/usb/core/generic.c') diff --git a/drivers/usb/core/generic.c b/drivers/usb/core/generic.c index 271e761f563e..acbfeb0a0119 100644 --- a/drivers/usb/core/generic.c +++ b/drivers/usb/core/generic.c @@ -169,7 +169,7 @@ static int generic_probe(struct usb_device *udev) c = usb_choose_configuration(udev); if (c >= 0) { err = usb_set_configuration(udev, c); - if (err) { + if (err && err != -ENODEV) { dev_err(&udev->dev, "can't set config #%d, error %d\n", c, err); /* This need not be fatal. The user can try to -- cgit v1.2.3