diff options
author | Chunfeng Yun <chunfeng.yun@mediatek.com> | 2023-04-17 04:52:00 +0200 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2023-04-20 11:17:05 +0200 |
commit | ed50be81d536cdb25d00befe6ca21cd02f1c509d (patch) | |
tree | 6eb496f96176416e500b1212c3f0d8844e0a5144 /drivers/usb | |
parent | usb: mtu3: fix kernel panic at qmu transfer done irq handler (diff) | |
download | linux-ed50be81d536cdb25d00befe6ca21cd02f1c509d.tar.xz linux-ed50be81d536cdb25d00befe6ca21cd02f1c509d.zip |
usb: mtu3: unlock @mtu->lock just before giving back request
No need unlock @mtu->lock when unmap request, unlock it just before
giving back request, due to we do not lock this spinlock when map
the request.
Reviewed-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>
Signed-off-by: Chunfeng Yun <chunfeng.yun@mediatek.com>
Link: https://lore.kernel.org/r/20230417025203.18097-4-chunfeng.yun@mediatek.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/usb')
-rw-r--r-- | drivers/usb/mtu3/mtu3_gadget.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/usb/mtu3/mtu3_gadget.c b/drivers/usb/mtu3/mtu3_gadget.c index c0264d5426bf..ad0eeac4332d 100644 --- a/drivers/usb/mtu3/mtu3_gadget.c +++ b/drivers/usb/mtu3/mtu3_gadget.c @@ -23,7 +23,6 @@ __acquires(mep->mtu->lock) req->status = status; trace_mtu3_req_complete(mreq); - spin_unlock(&mtu->lock); /* ep0 makes use of PIO, needn't unmap it */ if (mep->epnum) @@ -32,6 +31,7 @@ __acquires(mep->mtu->lock) dev_dbg(mtu->dev, "%s complete req: %p, sts %d, %d/%d\n", mep->name, req, req->status, req->actual, req->length); + spin_unlock(&mtu->lock); usb_gadget_giveback_request(&mep->ep, req); spin_lock(&mtu->lock); } |