Merge "diag: Protect the decrement of number of diag clients"
This commit is contained in:
commit
bb9c0e0ec8
1 changed files with 1 additions and 1 deletions
|
@ -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;
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue