net: mscc: ocelot: fix mutex_lock not released
authorLv Ruyi <lv.ruyi@zte.com.cn>
Tue, 30 Nov 2021 11:24:43 +0000 (11:24 +0000)
committerDavid S. Miller <davem@davemloft.net>
Tue, 30 Nov 2021 12:30:26 +0000 (12:30 +0000)
commit9c32950f24f9e7df158887bdc80e5b79fbf5ed8d
tree8cf80958d31b45645e9d76200510284a42b7a84e
parentc0190879323f88be22a0debda814680dc6e66751
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>
drivers/net/ethernet/mscc/ocelot.c