Re: [PATCH] staging: greybus: hid: fix SET_REPORT return value
From: Dan Carpenter
Date: Thu Jul 09 2026 - 06:55:59 EST
On Sat, Jul 04, 2026 at 04:16:13PM +0800, Hao-Qun Huang wrote:
> __gb_hid_output_raw_report() stores the result of gb_hid_set_report()
> in ret and even adjusts it to account for the report ID byte, but then
> always returns 0.
>
> This hides Greybus transport errors from HID_REQ_SET_REPORT callers,
> and makes hidraw report zero bytes written to user space on success,
> although hid_hw_raw_request() is expected to return the number of
> bytes transferred or a negative errno. The sibling GET_REPORT path,
> __gb_hid_get_raw_report(), already follows this convention.
>
> Return ret like the other HID transport drivers do.
>
> Fixes: 96eab779e198 ("greybus: hid: add HID class driver")
> Cc: stable@xxxxxxxxxxxxxxx
> Assisted-by: Claude:claude-fable-5
> Signed-off-by: Hao-Qun Huang <alvinhuang0603@xxxxxxxxx>
> ---
These kinds of changes require testing. How have you tested this
change?
regards,
dan carpenter