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

Commit 3248d332 authored by Prabhat Awasthi's avatar Prabhat Awasthi
Browse files

msm: kgsl: Don't open kgsl device in erroneous case



If kgsl_get_process_private() returns NULL, it goes to
err_stop with result = -ENOMEM. If open_count is 0,
adreno_stop() overwrites the result variable with 0.
This leads to kgsl_open() to be successful while it
shouldn't.

Change-Id: Ic12d92a099280e4d958fa192fa5128211120d361
Signed-off-by: default avatarPrabhat Awasthi <pawasthi@codeaurora.org>
parent 5025dd2f
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -1065,7 +1065,7 @@ err_stop:
	if (device->open_count == 0) {
		/* make sure power is on to stop the device */
		kgsl_pwrctrl_enable(device);
		result = device->ftbl->stop(device);
		device->ftbl->stop(device);
		kgsl_pwrctrl_set_state(device, KGSL_STATE_INIT);
		atomic_dec(&device->active_cnt);
	}