Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit bb9c0e0e authored by Linux Build Service Account's avatar Linux Build Service Account Committed by Gerrit - the friendly Code Review server
Browse files

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

parents 8fbab95a 6eb2f4f6
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -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;
}