Re: [PATCH] net: mvneta: fix locking in mvneta_cpu_online()

From: Simon Horman
Date: Tue Jan 21 2025 - 04:54:05 EST


On Mon, Jan 20, 2025 at 04:50:02PM -0800, Harshit Mogalapalli wrote:
> When port is stopped, unlock before returning
>
> Fixes: 413f0271f396 ("net: protect NAPI enablement with netdev_lock()")
> Signed-off-by: Harshit Mogalapalli <harshit.m.mogalapalli@xxxxxxxxxx>
> ---
> This is based on static analysis, only compile tested

Thanks Harshit,

I agree that this is correct.

FWIIW, I would have used the idiomatic approach of a goto to jump to nearly
the end of the function, but the effect is the same either way.

Reviewed-by: Simon Horman <horms@xxxxxxxxxx>