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: <CAHp75VeNijg6sXyW_frwD4siJ-LWBLBfVCmMDug8jYAVVg9Bmw@mail.gmail.com>
Date: Fri, 15 Mar 2024 01:36:57 +0200
From: Andy Shevchenko <andy.shevchenko@...il.com>
To: George Stark <gnstark@...utedevices.com>
Cc: pavel@....cz, lee@...nel.org, vadimp@...dia.com, 
	christophe.leroy@...roup.eu, hdegoede@...hat.com, mazziesaccount@...il.com, 
	peterz@...radead.org, mingo@...hat.com, will@...nel.org, longman@...hat.com, 
	boqun.feng@...il.com, nikitos.tr@...il.com, marek.behun@....cz, 
	kabel@...nel.org, linux-leds@...r.kernel.org, linux-kernel@...r.kernel.org, 
	kernel@...utedevices.com
Subject: Re: [PATCH v7 4/8] leds: lp3952: use devm API to cleanup module's resources

On Thu, Mar 14, 2024 at 10:19 PM George Stark <gnstark@...utedevices.com> wrote:
>
> In this driver LEDs are registered using devm_led_classdev_register()
> so they are automatically unregistered after module's remove() is done.
> led_classdev_unregister() calls module's led_set_brightness() to turn off
> the LEDs and that callback uses resources which were destroyed already
> in module's remove() so use devm API instead of remove().
> Also drop explicit turning LEDs off from remove() due to they will be off
> anyway by led_classdev_unregister().

..

> +static void gpio_set_low_action(void *data)
> +{
> +       struct lp3952_led_array *priv = (struct lp3952_led_array *)data;

In case of new series, drop these castings in patches 4-6.

> +       gpiod_set_value(priv->enable_gpio, 0);
> +}


-- 
With Best Regards,
Andy Shevchenko

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ