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: Mallikarjuna Reddy Amireddy <mamire@codeaurora.org> Signed-off-by: Zhen Kong <zkong@codeaurora.org>
This commit is contained in:
parent
9b82a4c589
commit
12f9041489
1 changed files with 6 additions and 2 deletions
|
@ -7146,8 +7146,10 @@ static int qseecom_open(struct inode *inode, struct file *file)
|
||||||
atomic_set(&data->ioctl_count, 0);
|
atomic_set(&data->ioctl_count, 0);
|
||||||
|
|
||||||
data->sglistinfo_ptr = kzalloc(SGLISTINFO_TABLE_SIZE, GFP_KERNEL);
|
data->sglistinfo_ptr = kzalloc(SGLISTINFO_TABLE_SIZE, GFP_KERNEL);
|
||||||
if (!(data->sglistinfo_ptr))
|
if (!(data->sglistinfo_ptr)) {
|
||||||
|
kzfree(data);
|
||||||
return -ENOMEM;
|
return -ENOMEM;
|
||||||
|
}
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -8011,8 +8013,10 @@ static int qseecom_check_whitelist_feature(void)
|
||||||
qseecom.whitelist_support = true;
|
qseecom.whitelist_support = true;
|
||||||
ret = 0;
|
ret = 0;
|
||||||
} else {
|
} 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);
|
ret, resp.result);
|
||||||
|
qseecom.whitelist_support = false;
|
||||||
|
ret = 0;
|
||||||
}
|
}
|
||||||
kfree(buf);
|
kfree(buf);
|
||||||
return ret;
|
return ret;
|
||||||
|
|
Loading…
Add table
Reference in a new issue