]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
usb: gadget: align buffer size when allocating for OUT endpoint
authorFelipe F. Tonello <eu@felipetonello.com>
Mon, 8 Aug 2016 20:30:06 +0000 (21:30 +0100)
committerSasha Levin <alexander.levin@microsoft.com>
Wed, 23 May 2018 01:33:55 +0000 (21:33 -0400)
commit9b20332e6fa4260071845ec8a40c9506171f81b9
tree89dc3a671ec5abb63c145b30d74f288f21fac9d2
parent8dac950563d9d0c503c247069d42baf41331f19b
usb: gadget: align buffer size when allocating for OUT endpoint

[ Upstream commit e0466156ee2e944fb47a3fa00932c3698a6d2c67 ]

Using usb_ep_align() makes sure that the buffer size for OUT endpoints is
always aligned with wMaxPacketSize (512 usually). This makes sure
that no buffer has the wrong size, which can cause nasty bugs.

Signed-off-by: Felipe F. Tonello <eu@felipetonello.com>
Signed-off-by: Felipe Balbi <felipe.balbi@linux.intel.com>
Signed-off-by: Sasha Levin <alexander.levin@microsoft.com>
drivers/usb/gadget/u_f.c
drivers/usb/gadget/u_f.h