Re: [PATCH] usb: core: Abort deauthorization if unsetting configuration fails

2013-12-04 Thread Julius Werner
> Instead, how about changing usb_set_configuration() so that it will > never fail when the new config is -1? Except perhaps for -ENODEV > errors (the device has been disconnected), which > usb_deauthorize_device() could check for. Yes, that should work as well. It's really just one autoresume an

Re: [PATCH] usb: core: Abort deauthorization if unsetting configuration fails

2013-12-04 Thread Alan Stern
On Tue, 3 Dec 2013, Julius Werner wrote: > usb_deauthorize_device() tries to unset the configuration of a USB > device and then unconditionally blows away the configuration descriptors > with usb_destroy_configuration(). This is bad if the > usb_set_configuration() call failed before the configura

[PATCH] usb: core: Abort deauthorization if unsetting configuration fails

2013-12-03 Thread Julius Werner
usb_deauthorize_device() tries to unset the configuration of a USB device and then unconditionally blows away the configuration descriptors with usb_destroy_configuration(). This is bad if the usb_set_configuration() call failed before the configuration could be correctly unset, since pointers like