diff options
| author | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2020-09-14 06:57:52 +0200 |
|---|---|---|
| committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2020-09-14 06:57:52 +0200 |
| commit | 1622d35453132a1acd6d650175f9f45e4bcf553e (patch) | |
| tree | 063a2dfa220452590d068418c2b16b90690dae5a /drivers/usb/core/sysfs.c | |
| parent | 978620cc4f5577c5139da9d8377849aeac46687a (diff) | |
| parent | 856deb866d16e29bd65952e0289066f6078af773 (diff) | |
Merge 5.9-rc5 into staging-next
We want the staging/iio changes in here as well.
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/usb/core/sysfs.c')
| -rw-r--r-- | drivers/usb/core/sysfs.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/drivers/usb/core/sysfs.c b/drivers/usb/core/sysfs.c index a2ca38e25e0c..8d134193fa0c 100644 --- a/drivers/usb/core/sysfs.c +++ b/drivers/usb/core/sysfs.c @@ -889,7 +889,11 @@ read_descriptors(struct file *filp, struct kobject *kobj, size_t srclen, n; int cfgno; void *src; + int retval; + retval = usb_lock_device_interruptible(udev); + if (retval < 0) + return -EINTR; /* The binary attribute begins with the device descriptor. * Following that are the raw descriptor entries for all the * configurations (config plus subsidiary descriptors). @@ -914,6 +918,7 @@ read_descriptors(struct file *filp, struct kobject *kobj, off -= srclen; } } + usb_unlock_device(udev); return count - nleft; } |