summaryrefslogtreecommitdiff
path: root/tools/usb/usbip
diff options
context:
space:
mode:
authorMattias Jacobsson <2pi@mok.nu>2018-10-16 15:20:08 +0300
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2018-10-18 20:44:39 +0300
commit090158555ff8d194a98616034100b16697dd80d0 (patch)
tree39b86a6ad61fbedc08c6b2169678a842a689b1a8 /tools/usb/usbip
parent644930cbad32c0a850aaeed11eb2a49b492bf51a (diff)
downloadlinux-090158555ff8d194a98616034100b16697dd80d0.tar.xz
USB: misc: appledisplay: fix backlight update_status return code
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>
Diffstat (limited to 'tools/usb/usbip')
0 files changed, 0 insertions, 0 deletions