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

Commit 4a3e522b authored by Zhen Kong's avatar Zhen Kong
Browse files

qseecom: Change whitelist_support flag to false if TZ failed to check



The whitelist status is set default as true though TZ failed to check,
which in turn causing the send_command fail by passing whitelist commnd id.
So updating the support status flag to false when TZ fails to check.

Change-Id: I78a7600506b4d2457bb1c38f8a39888a9cf9467c
Signed-off-by: default avatarMallikarjuna Reddy Amireddy <mamire@codeaurora.org>
Signed-off-by: default avatarZhen Kong <zkong@codeaurora.org>
parent 4739af86
Loading
Loading
Loading
Loading
+6 −2
Original line number Diff line number Diff line
@@ -7129,8 +7129,10 @@ static int qseecom_open(struct inode *inode, struct file *file)
	atomic_set(&data->ioctl_count, 0);

	data->sglistinfo_ptr = kzalloc(SGLISTINFO_TABLE_SIZE, GFP_KERNEL);
	if (!(data->sglistinfo_ptr))
	if (!(data->sglistinfo_ptr)) {
		kzfree(data);
		return -ENOMEM;
	}
	return ret;
}

@@ -7994,8 +7996,10 @@ static int qseecom_check_whitelist_feature(void)
		qseecom.whitelist_support = true;
		ret = 0;
	} else {
		pr_err("Failed to check whitelist: ret = %d, result = 0x%x\n",
		pr_info("Check whitelist with ret = %d, result = 0x%x\n",
			ret, resp.result);
		qseecom.whitelist_support = false;
		ret = 0;
	}
	kfree(buf);
	return ret;