Re: [PATCH v2] leds: lp5860: Return an error for an out-of-range 'reg' property
Mert Seftali <[email protected]>
| Newsgroups | org.kernel.vger.linux-leds,org.kernel.vger.linux-kernel |
|---|---|
| Message-ID | <CAA3NooobiVAzHcoJPTuFur9n1F=z5z9aYRqSJtD0CR3i5qYtfw@mail.gmail.com> |
On Thu, 2 Jul 2026, Lee Jones wrote: > This isn't a bug introduced by this patch, but while reviewing the driver > I noticed a double unlock in lp5860_device_init(): [...] > If lp5860_init_dt() fails, doesn't the jump to err_disable result in > calling mutex_unlock() on an already unlocked mutex? Confirmed, i'll move the unlock out of err_disable so it can't fire twice. > This is also a pre-existing issue, but I noticed a potential > use-after-destroy involving the same mutex in the removal path: [...] > Does this sequence result in lp5860_chip_enable() locking a mutex that > was just destroyed by lp5860_remove()? i'll swap the order so device_remove() runs before mutex_destroy(). I'll send both as a small two-patch series crediting you as Reported-by or let me know if you'd rather the Sashiko findings be credited to the tool instead. thanks for flagging these! Mert