aboutsummaryrefslogtreecommitdiffstats
path: root/scripts/gcc-plugins
diff options
context:
space:
mode:
authorTudor Ambarus <[email protected]>2024-08-02 14:04:27 +0000
committerGreg Kroah-Hartman <[email protected]>2024-08-07 10:40:37 +0000
commit382b6eabb0316b7334d97afbdcf33a4e20b0ecd8 (patch)
treed32e8884ad76d3b0ea174d4720d48c4d4efcecbd /scripts/gcc-plugins
parentMerge tag 'usb-serial-6.11-rc2' of https://git.kernel.org/pub/scm/linux/kerne... (diff)
downloadkernel-382b6eabb0316b7334d97afbdcf33a4e20b0ecd8.tar.gz
kernel-382b6eabb0316b7334d97afbdcf33a4e20b0ecd8.zip
usb: gadget: f_fs: restore ffs_func_disable() functionality
The blamed commit made ffs_func_disable() always return -EINVAL as the method calls ffs_func_set_alt() with the ``alt`` argument being ``(unsigned)-1``, which is always greater than MAX_ALT_SETTINGS. Use the MAX_ALT_SETTINGS check just in the f->set_alt() code path, f->disable() doesn't care about the ``alt`` parameter. Make a surgical fix, but really the f->disable() code shall be pulled out from ffs_func_set_alt(), the code will become clearer. A patch will follow. Note that ffs_func_disable() always returning -EINVAL made pixel6 crash on USB disconnect. Fixes: 2f550553e23c ("usb: gadget: f_fs: Add the missing get_alt callback") Cc: stable <[email protected]> Reported-by: William McVicker <[email protected]> Signed-off-by: Tudor Ambarus <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Greg Kroah-Hartman <[email protected]>
Diffstat (limited to 'scripts/gcc-plugins')
0 files changed, 0 insertions, 0 deletions