Commit e386309e authored by Prashanth K's avatar Prashanth K Committed by Treehugger Robot
Browse files

UPSTREAM: usb: gadget: f_uac2: Fix incorrect setting of bNumEndpoints



Currently afunc_bind sets std_ac_if_desc.bNumEndpoints to 1 if
controls (mute/volume) are enabled. During next afunc_bind call,
bNumEndpoints would be unchanged and incorrectly set to 1 even
if the controls aren't enabled.

Fix this by resetting the value of bNumEndpoints to 0 on every
afunc_bind call.

Bug: 254441685
Fixes: eaf6cbe0 ("usb: gadget: f_uac2: add volume and mute support")
Cc: stable <stable@kernel.org>
Signed-off-by: default avatarPrashanth K <quic_prashk@quicinc.com>
Link: https://lore.kernel.org/r/20241211115915.159864-1-quic_prashk@quicinc.com


Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
(cherry picked from commit 057bd54d)
Signed-off-by: default avatarLee Jones <joneslee@google.com>
Change-Id: I1da43996d35411850984b6a9a9f79ef4dc63b5b5
parent e715fae5
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment