android_kernel_samsung_a7y1.../drivers/usb/misc
Mattias Jacobsson d9ffce1d65 USB: misc: appledisplay: fix backlight update_status return code
[ Upstream commit 090158555ff8d194a98616034100b16697dd80d0 ]

Upon success the update_status handler returns a positive number
corresponding to the number of bytes transferred by usb_control_msg.
However the return code of the update_status handler should indicate if
an error occurred(negative) or how many bytes of the user's input to sysfs
that was consumed. Return code zero indicates all bytes were consumed.

The bug can for example result in the update_status handler being called
twice, the second time with only the "unconsumed" part of the user's input
to sysfs. Effectively setting an incorrect brightness.

Change the update_status handler to return zero for all successful
transactions and forward usb_control_msg's error code upon failure.

Signed-off-by: Mattias Jacobsson <2pi@mok.nu>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2020-04-07 12:35:04 +02:00
..
sisusbvga USB: sisusbvga: fix oops in error path of sisusb_probe 2020-04-06 18:21:10 +02:00
adutux.c USB: adutux: fix use-after-free on release 2020-04-07 08:08:55 +02:00
appledisplay.c USB: misc: appledisplay: fix backlight update_status return code 2020-04-07 12:35:04 +02:00
chaoskey.c USB: chaoskey: fix use-after-free on release 2020-04-07 08:09:05 +02:00
cypress_cy7c63.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
cytherm.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
ehset.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
emi26.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
emi62.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
ezusb.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
ftdi-elan.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
idmouse.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
iowarrior.c USB: iowarrior: fix use-after-free after driver unbind 2020-04-07 08:09:01 +02:00
isight_firmware.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
Kconfig USB: rio500: Remove Rio 500 kernel driver 2020-04-07 08:08:28 +02:00
ldusb.c USB: ldusb: fix control-message timeout 2020-04-07 09:28:14 +02:00
legousbtower.c USB: legousbtower: fix a signedness bug in tower_probe() 2020-04-07 09:27:56 +02:00
lvstest.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
Makefile USB: rio500: Remove Rio 500 kernel driver 2020-04-07 08:08:28 +02:00
trancevibrator.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
usb_u132.h A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
usb3503.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
usblcd.c USB: usblcd: fix I/O after disconnect 2020-04-07 08:09:21 +02:00
usbled.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
usbsevseg.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
usbtest.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
uss720.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
yurex.c USB: yurex: fix NULL-derefs on disconnect 2020-04-07 08:08:33 +02:00