* [PATCH] wifi: mt76: mt7915: unlock on error in mt7915_thermal_temp_store()
@ 2023-02-16 12:15 Dan Carpenter
2023-02-16 13:25 ` Lorenzo Bianconi
0 siblings, 1 reply; 2+ messages in thread
From: Dan Carpenter @ 2023-02-16 12:15 UTC (permalink / raw)
To: Howard Hsu
Cc: Lorenzo Bianconi, Ryder Lee, Shayne Chen, Sean Wang, Kalle Valo,
Matthias Brugger, AngeloGioacchino Del Regno, Peter Chiu,
MeiChia Chiu, Nicolas Cavallari, Bo Jiao, Howard Hsu,
linux-wireless, linux-mediatek, kernel-janitors
Drop the lock before returning -EINVAL.
Fixes: ecaccdae7a7e ("wifi: mt76: mt7915: rework mt7915_thermal_temp_store()")
Signed-off-by: Dan Carpenter <error27@gmail.com>
---
drivers/net/wireless/mediatek/mt76/mt7915/init.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/drivers/net/wireless/mediatek/mt76/mt7915/init.c b/drivers/net/wireless/mediatek/mt76/mt7915/init.c
index 1ab768feccaa..728150b35537 100644
--- a/drivers/net/wireless/mediatek/mt76/mt7915/init.c
+++ b/drivers/net/wireless/mediatek/mt76/mt7915/init.c
@@ -89,6 +89,7 @@ static ssize_t mt7915_thermal_temp_store(struct device *dev,
val < phy->throttle_temp[MT7915_CRIT_TEMP_IDX])) {
dev_err(phy->dev->mt76.dev,
"temp1_max shall be greater than temp1_crit.");
+ mutex_unlock(&phy->dev->mt76.mutex);
return -EINVAL;
}
--
2.39.1
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] wifi: mt76: mt7915: unlock on error in mt7915_thermal_temp_store()
2023-02-16 12:15 [PATCH] wifi: mt76: mt7915: unlock on error in mt7915_thermal_temp_store() Dan Carpenter
@ 2023-02-16 13:25 ` Lorenzo Bianconi
0 siblings, 0 replies; 2+ messages in thread
From: Lorenzo Bianconi @ 2023-02-16 13:25 UTC (permalink / raw)
To: Dan Carpenter
Cc: Howard Hsu, Ryder Lee, Shayne Chen, Sean Wang, Kalle Valo,
Matthias Brugger, AngeloGioacchino Del Regno, Peter Chiu,
MeiChia Chiu, Nicolas Cavallari, Bo Jiao, linux-wireless,
linux-mediatek, kernel-janitors
[-- Attachment #1: Type: text/plain, Size: 944 bytes --]
> Drop the lock before returning -EINVAL.
>
> Fixes: ecaccdae7a7e ("wifi: mt76: mt7915: rework mt7915_thermal_temp_store()")
> Signed-off-by: Dan Carpenter <error27@gmail.com>
Acked-by: Lorenzo Bianconi <lorenzo@kernel.org>
> ---
> drivers/net/wireless/mediatek/mt76/mt7915/init.c | 1 +
> 1 file changed, 1 insertion(+)
>
> diff --git a/drivers/net/wireless/mediatek/mt76/mt7915/init.c b/drivers/net/wireless/mediatek/mt76/mt7915/init.c
> index 1ab768feccaa..728150b35537 100644
> --- a/drivers/net/wireless/mediatek/mt76/mt7915/init.c
> +++ b/drivers/net/wireless/mediatek/mt76/mt7915/init.c
> @@ -89,6 +89,7 @@ static ssize_t mt7915_thermal_temp_store(struct device *dev,
> val < phy->throttle_temp[MT7915_CRIT_TEMP_IDX])) {
> dev_err(phy->dev->mt76.dev,
> "temp1_max shall be greater than temp1_crit.");
> + mutex_unlock(&phy->dev->mt76.mutex);
> return -EINVAL;
> }
>
> --
> 2.39.1
>
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 228 bytes --]
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2023-02-16 13:25 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-02-16 12:15 [PATCH] wifi: mt76: mt7915: unlock on error in mt7915_thermal_temp_store() Dan Carpenter
2023-02-16 13:25 ` Lorenzo Bianconi
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox