mirror of
https://github.com/torvalds/linux.git
synced 2026-05-27 00:22:00 +02:00
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:
parent
c019087932
commit
9c32950f24
|
|
@ -1651,8 +1651,10 @@ int ocelot_hwstamp_set(struct ocelot *ocelot, int port, struct ifreq *ifr)
|
|||
}
|
||||
|
||||
err = ocelot_setup_ptp_traps(ocelot, port, l2, l4);
|
||||
if (err)
|
||||
if (err) {
|
||||
mutex_unlock(&ocelot->ptp_lock);
|
||||
return err;
|
||||
}
|
||||
|
||||
if (l2 && l4)
|
||||
cfg.rx_filter = HWTSTAMP_FILTER_PTP_V2_EVENT;
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user