]> git.baikalelectronics.ru Git - kernel.git/commit
net: mscc: ocelot: fix missing unlock on error in ocelot_hwstamp_set()
authorWei Yongjun <weiyongjun1@huawei.com>
Mon, 29 Nov 2021 15:16:52 +0000 (15:16 +0000)
committerJakub Kicinski <kuba@kernel.org>
Tue, 30 Nov 2021 04:20:34 +0000 (20:20 -0800)
commit559a3e7d1b918613ca940f3b01a7c12f9ece6773
treea808bbca7b8a56cc3702520c1b7c5132f34e43be
parentb35c0550a8ae3b46f01bc0180e5e20eb8a08c24b
net: mscc: ocelot: fix missing unlock on error in ocelot_hwstamp_set()

Add the missing mutex_unlock before return from function
ocelot_hwstamp_set() in the ocelot_setup_ptp_traps() error
handling case.

Fixes: c59e9117cf93 ("net: mscc: ocelot: set up traps for PTP packets")
Reported-by: Hulk Robot <hulkci@huawei.com>
Signed-off-by: Wei Yongjun <weiyongjun1@huawei.com>
Reviewed-by: Vladimir Oltean <vladimir.oltean@nxp.com>
Link: https://lore.kernel.org/r/20211129151652.1165433-1-weiyongjun1@huawei.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
drivers/net/ethernet/mscc/ocelot.c