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

Commit a7296e5e authored by Deepak Kumar's avatar Deepak Kumar Committed by Akhil P Oommen
Browse files

msm: kgsl: Check for gmu prealloc failure only in case of prealloc request



Check for gmu prealloc failure only in case of prealloc request to avoid
use of uninitialized ret variable.

Change-Id: Ie0718f17fb9517e3e7659c277ff6f2fc3ef07f53
Signed-off-by: default avatarDeepak Kumar <dkumar@codeaurora.org>
Signed-off-by: default avatarAkhil P Oommen <akhilpo@codeaurora.org>
parent 41539720
Loading
Loading
Loading
Loading
+4 −3
Original line number Diff line number Diff line
@@ -1211,12 +1211,13 @@ static int a6xx_gmu_load_firmware(struct kgsl_device *device)
		offset += sizeof(*blk);

		if (blk->type == GMU_BLK_TYPE_PREALLOC_REQ ||
				blk->type == GMU_BLK_TYPE_PREALLOC_PERSIST_REQ)
			blk->type == GMU_BLK_TYPE_PREALLOC_PERSIST_REQ) {
			ret = gmu_prealloc_req(device, blk);

			if (ret)
				return ret;
		}
	}

	 /* Request any other cache ranges that might be required */
	return gmu_cache_finalize(device);