Re: (subset) [PATCH v2] leds: lm3642: use guard to simplify locking

From: Lee Jones

Date: Thu Mar 26 2026 - 07:32:36 EST


On Fri, 20 Mar 2026 11:54:52 +0800, Richard Lyu wrote:
> The mutex_lock()/mutex_unlock() pattern requires explicitly pairing
> lock and unlock calls. Use guard(mutex) instead so the lock is
> automatically released when the scope exits.
>
> Convert to guard(mutex) in lm3642_torch_brightness_set(),
> lm3642_strobe_brightness_set(), and lm3642_indicator_brightness_set().
> Add #include <linux/cleanup.h> to support scoped guards.
>
> [...]

Applied, thanks!

[1/1] leds: lm3642: use guard to simplify locking
commit: a55e941e2283e931c8a292adc030c834f8ea0873

--
Lee Jones [李琼斯]