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] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAEVj2t=zcyRvn=eCvB1CtGNPOr9_g4catjPkV+WNKk-bvGmymA@mail.gmail.com>
Date:   Tue, 20 Sep 2022 18:09:53 -0400
From:   Daniel Ogorchock <djogorchock@...il.com>
To:     Icenowy Zheng <icenowy@...c.io>
Cc:     Jiri Kosina <jikos@...nel.org>,
        Benjamin Tissoires <benjamin.tissoires@...hat.com>,
        linux-input@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH] HID: nintendo: deregister home LED when it fails

On Fri, Apr 15, 2022 at 6:06 AM Icenowy Zheng <icenowy@...c.io> wrote:
>
> Some Pro Controller compatible controllers do not support home LED, and
> will fail when setting it. Currently this leads to probe failure.
>
> Change the code that fails probing to deregistering home LED.
>
> Signed-off-by: Icenowy Zheng <icenowy@...c.io>
> ---
>  drivers/hid/hid-nintendo.c | 5 ++---
>  1 file changed, 2 insertions(+), 3 deletions(-)
>
> diff --git a/drivers/hid/hid-nintendo.c b/drivers/hid/hid-nintendo.c
> index 2204de889739..ed93287c3afc 100644
> --- a/drivers/hid/hid-nintendo.c
> +++ b/drivers/hid/hid-nintendo.c
> @@ -1900,9 +1900,8 @@ static int joycon_leds_create(struct joycon_ctlr *ctlr)
>                 /* Set the home LED to 0 as default state */
>                 ret = joycon_home_led_brightness_set(led, 0);
>                 if (ret) {
> -                       hid_err(hdev, "Failed to set home LED dflt; ret=%d\n",
> -                                                                       ret);
> -                       return ret;
> +                       hid_warn(hdev, "Failed to set home LED dflt, unregistering home LED");
> +                       devm_led_classdev_unregister(&hdev->dev, led);
>                 }
>         }
>
> --
> 2.35.1
>

Reviewed-by: Daniel J. Ogorchock <djogorchock@...il.com>

Thanks for the patch. I haven't done any work to make the driver
compatible with non-official nintendo controllers. I suppose there
aren't many other options for controllers lacking full functionality
other than disabling those functions during probe, as demonstrated
here.

-Daniel

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ