staging: rtl8712: fix double lock bug in SetPSModeWorkItemCallback()
authorWei Yongjun <weiyongjun1@huawei.com>
Thu, 15 Sep 2016 10:12:05 +0000 (10:12 +0000)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 16 Sep 2016 08:05:13 +0000 (10:05 +0200)
Fix a double lock bug in SetPSModeWorkItemCallback().

Fixes: 5c2ba8b85e35 ("rtl8712: pwrctrl_priv: Replace semaphore lock with mutex")
Signed-off-by: Wei Yongjun <weiyongjun1@huawei.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/rtl8712/rtl871x_pwrctrl.c

index 8f82d85178ab4af33f4d382636c7854a8ff4b152..d464c136dd987ff2ae89be879e90d1bb4103633d 100644 (file)
@@ -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);
        }
 }