summaryrefslogtreecommitdiffstats
path: root/drivers/usb/mtu3/mtu3_gadget_ep0.c
diff options
context:
space:
mode:
authorChunfeng Yun <chunfeng.yun@mediatek.com>2018-04-24 04:52:46 +0200
committerFelipe Balbi <felipe.balbi@linux.intel.com>2018-05-15 09:14:56 +0200
commit288ee3c36255d0c2d32830313f527e1474a09e9f (patch)
tree80dba1252048d316f6102c196c81d13aa3e0b4bd /drivers/usb/mtu3/mtu3_gadget_ep0.c
parentusb: phy: simplify getting .drvdata (diff)
downloadlinux-288ee3c36255d0c2d32830313f527e1474a09e9f.tar.xz
linux-288ee3c36255d0c2d32830313f527e1474a09e9f.zip
usb: mtu3: avoid TX data length truncated in SS/SSP mode
The variable of 'count' is declared as u8, this will cause an issue due to value truncated when works in SS or SSP mode and data length is greater than 255, so change it as u32. Signed-off-by: Chunfeng Yun <chunfeng.yun@mediatek.com> Signed-off-by: Felipe Balbi <felipe.balbi@linux.intel.com>
Diffstat (limited to 'drivers/usb/mtu3/mtu3_gadget_ep0.c')
-rw-r--r--drivers/usb/mtu3/mtu3_gadget_ep0.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/usb/mtu3/mtu3_gadget_ep0.c b/drivers/usb/mtu3/mtu3_gadget_ep0.c
index ebdcf7a38c29..d67b54099562 100644
--- a/drivers/usb/mtu3/mtu3_gadget_ep0.c
+++ b/drivers/usb/mtu3/mtu3_gadget_ep0.c
@@ -546,7 +546,7 @@ static void ep0_tx_state(struct mtu3 *mtu)
struct usb_request *req;
u32 csr;
u8 *src;
- u8 count;
+ u32 count;
u32 maxp;
dev_dbg(mtu->dev, "%s\n", __func__);