icnss: Correct condition to check invalid address range

For wlfw_msa_mem_info_send_sync_msg QMI request to firmware,
it expects range of addresses and size in response from firmware.
Correct condition used to check whether address and size in
response fall under valid range.

Change-Id: If431fdf3d2bd8a913bd5ee34e0a5778d7c2f36e7
Signed-off-by: Naman Padhiar <npadhiar@codeaurora.org>
This commit is contained in:
Naman Padhiar 2019-08-30 12:39:38 +05:30
parent 2a61e30d44
commit 5d2f1dd556

View file

@ -1311,7 +1311,7 @@ static int wlfw_msa_mem_info_send_sync_msg(void)
for (i = 0; i < resp.mem_region_info_len; i++) {
if (resp.mem_region_info[i].size > penv->msa_mem_size ||
resp.mem_region_info[i].region_addr > max_mapped_addr ||
resp.mem_region_info[i].region_addr >= max_mapped_addr ||
resp.mem_region_info[i].region_addr < penv->msa_pa ||
resp.mem_region_info[i].size +
resp.mem_region_info[i].region_addr > max_mapped_addr) {