diff --git a/drivers/usb/core/message.c b/drivers/usb/core/message.c index 7cd4ec33dbf4..6ba32f4d3b8b 100644 --- a/drivers/usb/core/message.c +++ b/drivers/usb/core/message.c @@ -1338,6 +1338,17 @@ int usb_set_interface(struct usb_device *dev, int interface, int alternate) return -EINVAL; } + if (iface->cur_altsetting == alt) { + /* + * foolish bluetooth stack, don't try to set a setting you are + * already set to... + */ + pr_err("sudip: returning\n"); + return 0; + } else { + pr_err("sudip: in else\n"); + } + /* Make sure we have enough bandwidth for this alternate interface. * Remove the current alt setting and add the new alt setting. */