Re: [PATCH 2/6] regulator: core: skip nesting lock for -EDEADLK

From: Doug Anderson
Date: Mon Aug 21 2023 - 12:50:35 EST


Hi,

On Sat, Aug 19, 2023 at 3:46 PM Michał Mirosław <mirq-linux@xxxxxxxxxxxx> wrote:
>
> When ww_mutex_lock() returns -EDEADLK the nesting mutex-protected
> section becomes a no-op. Return early and avoid the extra lock.
>
> Signed-off-by: Michał Mirosław <mirq-linux@xxxxxxxxxxxx>
> ---
> drivers/regulator/core.c | 19 +++++++++----------
> 1 file changed, 9 insertions(+), 10 deletions(-)

Reviewed-by: Douglas Anderson <dianders@xxxxxxxxxxxx>