aboutsummaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
Diffstat (limited to 'drivers')
-rw-r--r--drivers/tee/optee/device.c11
1 files changed, 8 insertions, 3 deletions
diff --git a/drivers/tee/optee/device.c b/drivers/tee/optee/device.c
index 5e4938bbef2b..167839b371f2 100644
--- a/drivers/tee/optee/device.c
+++ b/drivers/tee/optee/device.c
@@ -35,8 +35,11 @@ static int get_devices(struct tee_context *ctx, u32 session,
35 struct tee_shm *device_shm, u32 *shm_size) 35 struct tee_shm *device_shm, u32 *shm_size)
36{ 36{
37 u32 ret = 0; 37 u32 ret = 0;
38 struct tee_ioctl_invoke_arg inv_arg = {0}; 38 struct tee_ioctl_invoke_arg inv_arg;
39 struct tee_param param[4] = {0}; 39 struct tee_param param[4];
40
41 memset(&inv_arg, 0, sizeof(inv_arg));
42 memset(&param, 0, sizeof(param));
40 43
41 /* Invoke PTA_CMD_GET_DEVICES function */ 44 /* Invoke PTA_CMD_GET_DEVICES function */
42 inv_arg.func = PTA_CMD_GET_DEVICES; 45 inv_arg.func = PTA_CMD_GET_DEVICES;
@@ -89,13 +92,15 @@ int optee_enumerate_devices(void)
89 const uuid_t pta_uuid = 92 const uuid_t pta_uuid =
90 UUID_INIT(0x7011a688, 0xddde, 0x4053, 93 UUID_INIT(0x7011a688, 0xddde, 0x4053,
91 0xa5, 0xa9, 0x7b, 0x3c, 0x4d, 0xdf, 0x13, 0xb8); 94 0xa5, 0xa9, 0x7b, 0x3c, 0x4d, 0xdf, 0x13, 0xb8);
92 struct tee_ioctl_open_session_arg sess_arg = {0}; 95 struct tee_ioctl_open_session_arg sess_arg;
93 struct tee_shm *device_shm = NULL; 96 struct tee_shm *device_shm = NULL;
94 const uuid_t *device_uuid = NULL; 97 const uuid_t *device_uuid = NULL;
95 struct tee_context *ctx = NULL; 98 struct tee_context *ctx = NULL;
96 u32 shm_size = 0, idx, num_devices = 0; 99 u32 shm_size = 0, idx, num_devices = 0;
97 int rc; 100 int rc;
98 101
102 memset(&sess_arg, 0, sizeof(sess_arg));
103
99 /* Open context with OP-TEE driver */ 104 /* Open context with OP-TEE driver */
100 ctx = tee_client_open_context(NULL, optee_ctx_match, NULL, NULL); 105 ctx = tee_client_open_context(NULL, optee_ctx_match, NULL, NULL);
101 if (IS_ERR(ctx)) 106 if (IS_ERR(ctx))