[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <YIAnKtpJa/K+0efq@mwanda>
Date: Wed, 21 Apr 2021 16:22:50 +0300
From: Dan Carpenter <dan.carpenter@...cle.com>
To: Giuseppe Cavallaro <peppe.cavallaro@...com>,
Tan Tee Min <tee.min.tan@...el.com>
Cc: Alexandre Torgue <alexandre.torgue@...s.st.com>,
Jose Abreu <joabreu@...opsys.com>,
"David S. Miller" <davem@...emloft.net>,
Jakub Kicinski <kuba@...nel.org>,
Maxime Coquelin <mcoquelin.stm32@...il.com>,
Wong Vee Khee <vee.khee.wong@...ux.intel.com>,
Richard Cochran <richardcochran@...il.com>,
netdev@...r.kernel.org, linux-stm32@...md-mailman.stormreply.com,
kernel-janitors@...r.kernel.org
Subject: [PATCH net-next] stmmac: intel: unlock on error path in
intel_crosststamp()
We recently added some new locking to this function but one error path
was overlooked. We need to drop the lock before returning.
Fixes: f4da56529da6 ("net: stmmac: Add support for external trigger timestamping")
Signed-off-by: Dan Carpenter <dan.carpenter@...cle.com>
---
drivers/net/ethernet/stmicro/stmmac/dwmac-intel.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/drivers/net/ethernet/stmicro/stmmac/dwmac-intel.c b/drivers/net/ethernet/stmicro/stmmac/dwmac-intel.c
index ec140fc4a0f5..bd662aaf664a 100644
--- a/drivers/net/ethernet/stmicro/stmmac/dwmac-intel.c
+++ b/drivers/net/ethernet/stmicro/stmmac/dwmac-intel.c
@@ -320,6 +320,7 @@ static int intel_crosststamp(ktime_t *device,
acr_value |= PTP_ACR_ATSEN3;
break;
default:
+ mutex_unlock(&priv->aux_ts_lock);
return -EINVAL;
}
writel(acr_value, ptpaddr + PTP_ACR);
--
2.30.2
Powered by blists - more mailing lists