summaryrefslogtreecommitdiff
path: root/drivers/usb/gadget/function/f_fs.c
diff options
context:
space:
mode:
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>2023-02-06 10:33:30 +0300
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2023-02-06 10:33:30 +0300
commit924fb3ec50f5156d21e4f484358fb36f75b91ca8 (patch)
treef36b768432fe7f7c07b28857533e1bfe16006abe /drivers/usb/gadget/function/f_fs.c
parent4f6dfc2136fb2e8dc3f571a5caff6b6e88281fc0 (diff)
parent4ec5183ec48656cec489c49f989c508b68b518e3 (diff)
downloadlinux-924fb3ec50f5156d21e4f484358fb36f75b91ca8.tar.xz
Merge 6.2-rc7 into usb-next
We need the USB fixes in here, and this resolves a merge conflict with the i915 driver as reported in linux-next Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/usb/gadget/function/f_fs.c')
-rw-r--r--drivers/usb/gadget/function/f_fs.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/usb/gadget/function/f_fs.c b/drivers/usb/gadget/function/f_fs.c
index b9dd4881928c..ddfc537c7526 100644
--- a/drivers/usb/gadget/function/f_fs.c
+++ b/drivers/usb/gadget/function/f_fs.c
@@ -279,8 +279,10 @@ static int __ffs_ep0_queue_wait(struct ffs_data *ffs, char *data, size_t len)
struct usb_request *req = ffs->ep0req;
int ret;
- if (!req)
+ if (!req) {
+ spin_unlock_irq(&ffs->ev.waitq.lock);
return -EINVAL;
+ }
req->zero = len < le16_to_cpu(ffs->ev.setup.wLength);