summaryrefslogtreecommitdiff
path: root/include/linux/usb
diff options
context:
space:
mode:
authorNikolay Yakimov <root@livid.pp.ru>2019-01-15 19:13:54 +0300
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2019-02-08 10:22:39 +0100
commit25b0161450363ed7fe9fe618cda202e15817311a (patch)
tree4864a2179683dadaebc03860c0922684456086ce /include/linux/usb
parent4fdc1790e6a9ef22399c6bc6e63b80f4609f3b7e (diff)
USB: Fix configuration selection issues introduced in v4.20.0
Commit f13912d3f014a introduced changes to the usb_choose_configuration function to better support USB Audio UAC3-compatible devices. However, there are a few problems with this patch. First of all, it adds new "if" clauses in the middle of an existing "if"/"else if" tree, which obviously breaks pre-existing logic. Secondly, since it continues iterating over configurations in one of the branches, other code in the loop can choose an unintended configuration. Finally, if an audio device's first configuration is UAC3-compatible, and there are multiple UAC3 configurations, the second one would be chosen, due to the first configuration never being checked for UAC3-compatibility. Commit ff2a8c532c14 tries to fix the second issue, but it goes about it in a somewhat unnecessarily convoluted way, in my opinion, and does nothing to fix the first or the last one. This patch tries to rectify problems described by essentially rewriting code introduced in f13912d3f014a. Notice the code was moved to *before* the "if"/"else if" tree. Signed-off-by: Nikolay Yakimov <root@livid.pp.ru> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'include/linux/usb')
0 files changed, 0 insertions, 0 deletions