diff --git a/drivers/usb/misc/yurex.c b/drivers/usb/misc/yurex.c index 494db0178..4eb30089d 100755 --- a/drivers/usb/misc/yurex.c +++ b/drivers/usb/misc/yurex.c @@ -412,8 +412,10 @@ static ssize_t yurex_read(struct file *file, char __user *buffer, size_t count, return -ENODEV; } - if (WARN_ON_ONCE(dev->bbu > S64_MAX || dev->bbu < S64_MIN)) + if (WARN_ON_ONCE(dev->bbu > S64_MAX || dev->bbu < S64_MIN)) { + mutex_unlock(&dev->io_mutex); return -EIO; + } spin_lock_irq(&dev->lock); scnprintf(in_buffer, MAX_S64_STRLEN, "%lld\n", dev->bbu);