net: mscc: ocelot: fix mutex_lock not released

If err is true, the function will be returned, but mutex_lock isn't
released.

Reported-by: Zeal Robot <zealci@zte.com.cn>
Signed-off-by: Lv Ruyi <lv.ruyi@zte.com.cn>
Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
Lv Ruyi 2021-11-30 11:24:43 +00:00 • committed by David S. Miller
commit 9c32950f24