Merge "input: misc: hbtp_input: fix memory corruption in list_del_entry"

This commit is contained in:
Linux Build Service Account 2017-07-31 23:43:58 -07:00 committed by Gerrit - the friendly Code Review server
commit 97c6cfb336

View file

@ -249,6 +249,10 @@ static int hbtp_input_release(struct inode *inode, struct file *file)
return -ENOTTY;
}
hbtp->count--;
if (!completion_done(&hbtp->power_suspend_sig))
complete(&hbtp->power_suspend_sig);
if (!completion_done(&hbtp->power_resume_sig))
complete(&hbtp->power_resume_sig);
if (hbtp->power_sig_enabled)
hbtp->power_sig_enabled = false;
mutex_unlock(&hbtp->mutex);