Skip to contentSkip to conversation

staging: rtl8712: fix double lock bug in SetPSModeWorkItemCallback()

PATCH In review Wei Yongjun 2 participants 3 messages Sep 15, 2016 – Sep 16, 2016 Staging

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 staging: rtl8712: fix double lock bug in SetPSModeWorkItemCallback()

From: Wei Yongjun <[email protected]>

Fix a double lock bug in SetPSModeWorkItemCallback().

Fixes 5c2ba8b85e35 ("rtl8712: pwrctrl_priv: Replace semaphore lock

with mutex")

---
 drivers/staging/rtl8712/rtl871x_pwrctrl.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/staging/rtl8712/rtl871x_pwrctrl.c +1 -1
index 8f82d85..d464c13 100644
@@ -145,7 +145,7 @@ static void SetPSModeWorkItemCallback(struct work_struct *work)
 		mutex_lock(&pwrpriv->mutex_lock);
 		if (pwrpriv->pwr_mode == PS_MODE_ACTIVE)
 			r8712_set_rpwm(padapter, PS_STATE_S4);
-		mutex_lock(&pwrpriv->mutex_lock);
+		mutex_unlock(&pwrpriv->mutex_lock);
 	}
 }
maintainer
#1 lore raw
Quoted 5 lines · Wei Yongjun

From: Wei Yongjun <[email protected]>

Fix a double lock bug in SetPSModeWorkItemCallback().

Fixes 5c2ba8b85e35 ("rtl8712: pwrctrl_priv: Replace semaphore lock > with mutex")

I don't see that commit id in any tree that I can find, are you sure it is correct?

thanks,

greg k-h

maintainer
#2 lore raw
Quoted 9 lines · Greg KH
Quoted 5 lines · Wei Yongjun

From: Wei Yongjun <[email protected]>

Fix a double lock bug in SetPSModeWorkItemCallback().

Fixes 5c2ba8b85e35 ("rtl8712: pwrctrl_priv: Replace semaphore lock > with mutex")

I don't see that commit id in any tree that I can find, are you sure it is correct?

Oh nevermind, I was looking at the wrong tree, sorry, this is fine...

greg k-h