lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <22n5q16s-o283-q94s-o7rq-o92p6s248qpo@xreary.bet>
Date: Fri, 12 Sep 2025 17:15:55 +0200 (CEST)
From: Jiri Kosina <jikos@...nel.org>
To: Sébastien Szymanski <sebastien.szymanski@...adeus.com>
cc: Benjamin Tissoires <bentiss@...nel.org>, 
    Linus Walleij <linus.walleij@...aro.org>, 
    Bartosz Golaszewski <brgl@...ev.pl>, 
    Bartosz Golaszewski <bartosz.golaszewski@...aro.org>, 
    linux-input@...r.kernel.org, linux-kernel@...r.kernel.org, 
    linux-gpio@...r.kernel.org
Subject: Re: [PATCH] HID: cp2112: fix setter callbacks return value

On Thu, 4 Sep 2025, Sébastien Szymanski wrote:

> Since commit 6485543488a6 ("HID: cp2112: use new line value setter
> callbacks"), setting a GPIO value always fails with error -EBADE.
> 
> That's because the returned value by the setter callbacks is the
> returned value by the hid_hw_raw_request() function which is the number of
> bytes sent on success or a negative value on error. The function
> gpiochip_set() returns -EBADE if the setter callbacks return a value >
> 0.
> 
> Fix this by making the setter callbacks return 0 on success or a negative
> value on error.
> 
> While at it, use the returned value by cp2112_gpio_set_unlocked() in the
> direction_output callback.
> 
> Fixes: 6485543488a6 ("HID: cp2112: use new line value setter callbacks")
> Signed-off-by: Sébastien Szymanski <sebastien.szymanski@...adeus.com>

Applied, thank you!

-- 
Jiri Kosina
SUSE Labs


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ