Merge "diag: Protect the decrement of number of diag clients"

This commit is contained in:
Linux Build Service Account 2018-03-20 08:36:15 -07:00 committed by Gerrit - the friendly Code Review server
commit bb9c0e0ec8

View file

@ -389,8 +389,8 @@ static int diagchar_open(struct inode *inode, struct file *file)
return -ENOMEM;
fail:
mutex_unlock(&driver->diagchar_mutex);
driver->num_clients--;
mutex_unlock(&driver->diagchar_mutex);
pr_err_ratelimited("diag: Insufficient memory for new client");
return -ENOMEM;
}