]> www.infradead.org Git - users/jedix/linux-maple.git/commit
usb: gadget: f_tcm: Don't prepare BOT write request twice
authorThinh Nguyen <Thinh.Nguyen@synopsys.com>
Wed, 11 Dec 2024 00:32:07 +0000 (00:32 +0000)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 24 Dec 2024 07:56:06 +0000 (08:56 +0100)
commit94d9bf671ae314cacc2d7bf96bd233b4abc7cede
tree4b14be2cc2d08ca8ce3f6a90eb5dcab49e8aa75c
parent25224c1f07d31c261d04dfbc705a7a0f314a825d
usb: gadget: f_tcm: Don't prepare BOT write request twice

The duplicate kmalloc here is causing memory leak. The request
preparation in bot_send_write_request is also done in
usbg_prepare_w_request. Remove the duplicate work.

Fixes: c52661d60f63 ("usb-gadget: Initial merge of target module for UASP + BOT")
Cc: stable@vger.kernel.org
Signed-off-by: Thinh Nguyen <Thinh.Nguyen@synopsys.com>
Link: https://lore.kernel.org/r/f4f26c3d586cde0d46f8c3bcb4e8ae32311b650d.1733876548.git.Thinh.Nguyen@synopsys.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/usb/gadget/function/f_tcm.c