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: Deepak Kumar <dkumar@codeaurora.org>
This commit is contained in:
Deepak Kumar 2020-11-09 15:12:31 +05:30
commit bda766cd68

View file

@ -1566,11 +1566,12 @@ int a6xx_gmu_parse_fw(struct adreno_device *adreno_dev)
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 = a6xx_gmu_process_prealloc(gmu, blk);
if (ret)
return ret;
if (ret)
return ret;
}
}
return 0;