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

Commit 6c80670d authored by Prakash Kamliya's avatar Prakash Kamliya
Browse files

msm: kgsl: Release device mutex on failure



profile_enable_set takes device mutex but do not
release it when vmalloc fails. Release mutex on
failure.

Change-Id: I6d5ed8fd078435916019afeca9f8c2bc2daa8e66
Signed-off-by: default avatarPrakash Kamliya <pkamliya@codeaurora.org>
parent 91cab8ef
Loading
Loading
Loading
Loading
+3 −1
Original line number Diff line number Diff line
@@ -538,8 +538,10 @@ static int profile_enable_set(void *data, u64 val)
	if (val && profile->log_buffer == NULL) {
		/* allocate profile_log_buffer the first time enabled */
		profile->log_buffer = vmalloc(ADRENO_PROFILE_LOG_BUF_SIZE);
		if (profile->log_buffer == NULL)
		if (profile->log_buffer == NULL) {
			mutex_unlock(&device->mutex);
			return -ENOMEM;
		}
		profile->log_tail = profile->log_buffer;
		profile->log_head = profile->log_buffer;
	}