diff options
| -rw-r--r-- | drivers/usb/core/message.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/usb/core/message.c b/drivers/usb/core/message.c index 64c7ab4702df..e0719b4ee189 100644 --- a/drivers/usb/core/message.c +++ b/drivers/usb/core/message.c | |||
| @@ -1286,6 +1286,8 @@ int usb_set_interface(struct usb_device *dev, int interface, int alternate) | |||
| 1286 | interface); | 1286 | interface); |
| 1287 | return -EINVAL; | 1287 | return -EINVAL; |
| 1288 | } | 1288 | } |
| 1289 | if (iface->unregistering) | ||
| 1290 | return -ENODEV; | ||
| 1289 | 1291 | ||
| 1290 | alt = usb_altnum_to_altsetting(iface, alternate); | 1292 | alt = usb_altnum_to_altsetting(iface, alternate); |
| 1291 | if (!alt) { | 1293 | if (!alt) { |
