usb: gadget: f_tcm: Cleanup requests on ep disable
authorThinh Nguyen <Thinh.Nguyen@synopsys.com>
Wed, 11 Dec 2024 00:33:25 +0000 (00:33 +0000)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 24 Dec 2024 07:56:07 +0000 (08:56 +0100)
commit89e4ec503d6b37a35720424b70911d61b451875f
tree94cf820de5958812f5f3fe0ff52d3fffae6583cd
parent76003eb6d09278f945eaee0e8134451485a07c69
usb: gadget: f_tcm: Cleanup requests on ep disable

There may be different reasons for the transfer to be cancelled. Don't
blindly free the command without checking its status. We may still need
to properly respond to cancelled command. Check and only free the
command on endpoint disable.

Signed-off-by: Thinh Nguyen <Thinh.Nguyen@synopsys.com>
Link: https://lore.kernel.org/r/6c4ae2b4c2a9037bdcb6f909e173a94b11f04657.1733876548.git.Thinh.Nguyen@synopsys.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/usb/gadget/function/f_tcm.c