/*Qualcomm Secure Execution Environment Communicator (QSEECOM) driver
*
- * Copyright (c) 2012-2018, The Linux Foundation. All rights reserved.
+ * Copyright (c) 2012-2019, The Linux Foundation. All rights reserved.
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 2 and
pr_err("Ion client can't retrieve the handle\n");
return -ENOMEM;
}
- if ((req->req_len < sizeof(uint32_t)) ||
+ if ((req->req_len <
+ sizeof(struct qseecom_param_memref)) ||
(req->ifd_data[i].cmd_buf_offset >
- req->req_len - sizeof(uint32_t))) {
+ req->req_len -
+ sizeof(struct qseecom_param_memref))) {
pr_err("Invalid offset/req len 0x%x/0x%x\n",
req->req_len,
req->ifd_data[i].cmd_buf_offset);