OSDN Git Service
(root)
/
uclinux-h8
/
linux.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
c019087
)
net: mscc: ocelot: fix mutex_lock not released
author
Lv Ruyi
<lv.ruyi@zte.com.cn>
Tue, 30 Nov 2021 11:24:43 +0000
(11:24 +0000)
committer
David S. Miller
<davem@davemloft.net>
Tue, 30 Nov 2021 12:30:26 +0000
(12:30 +0000)
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
patch
|
blob
|
history
diff --git
a/drivers/net/ethernet/mscc/ocelot.c
b/drivers/net/ethernet/mscc/ocelot.c
index
fe8abb3
..
b1856d8
100644
(file)
--- a/
drivers/net/ethernet/mscc/ocelot.c
+++ b/
drivers/net/ethernet/mscc/ocelot.c
@@
-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;