Commit 41888e96 authored by David Brownell's avatar David Brownell Committed by Greg Kroah-Hartman

[PATCH] USB: fix remove device after set_configuration

If a device can't be configured, the current test9 code forgets
to clean it out of sysfs.  This resolves that issue, so the retry
in usb_new_device() stands a chance of working.

The enumeration code still doesn't handle such errors well, but
at least this way that hub port can be used for another device.
parent 21033193
......@@ -1120,6 +1120,7 @@ int usb_new_device(struct usb_device *dev, struct device *parent)
if (err) {
dev_err(&dev->dev, "can't set config #%d, error %d\n",
dev->config[0].desc.bConfigurationValue, err);
device_del(&dev->dev);
goto fail;
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment