]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
usb: gadget: f_tcm: Fix Get/SetInterface return value
authorThinh Nguyen <Thinh.Nguyen@synopsys.com>
Wed, 11 Dec 2024 00:31:55 +0000 (00:31 +0000)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 13 Mar 2025 11:50:15 +0000 (12:50 +0100)
commit2cfbf53baeaf2320e6ea64c53457892d0d0203a0
tree2a6094f1b92a26fa731763f672900baf6655924f
parent3c1f8dfa01b3ca363925017a72f459bf15471737
usb: gadget: f_tcm: Fix Get/SetInterface return value

commit 3b997089903b909684114aca6f79d683e5c64a0e upstream.

Check to make sure that the GetInterface and SetInterface are for valid
interface. Return proper alternate setting number on GetInterface.

Fixes: 0b8b1a1fede0 ("usb: gadget: f_tcm: Provide support to get alternate setting in tcm function")
Cc: stable@vger.kernel.org
Signed-off-by: Thinh Nguyen <Thinh.Nguyen@synopsys.com>
Link: https://lore.kernel.org/r/ffd91b4640945ea4d3b4f4091cf1abbdbd9cf4fc.1733876548.git.Thinh.Nguyen@synopsys.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/usb/gadget/function/f_tcm.c