Re: [PATCH v2 4/4] iio: magnetometer: rm3100: Use guard(mutex)() in rm3100_trigger_handler()

From: Maxwell Doose

Date: Tue Apr 28 2026 - 14:13:08 EST


On Tue, Apr 28, 2026 at 10:32 AM Jonathan Cameron <jic23@xxxxxxxxxx> wrote:
>
[snip]
>
> There is even an outside chance of deadlock if you hold a local lock
> when calling iio_trigger_notify_done() as that can call back into the driver.
> Here you are ok because no trigger_ops are set so there isn't a reenable()
> callback.
>

Given this, I'll also likely go back to scoped_guard as well once we
remove the gotos, that way we'll be able to unlock it before we get to
a potential callback.

best regards,
maxwell