diff options
Diffstat (limited to 'drivers/tee/amdtee')
| -rw-r--r-- | drivers/tee/amdtee/call.c | 4 | ||||
| -rw-r--r-- | drivers/tee/amdtee/core.c | 10 | ||||
| -rw-r--r-- | drivers/tee/amdtee/shm_pool.c | 2 |
3 files changed, 8 insertions, 8 deletions
diff --git a/drivers/tee/amdtee/call.c b/drivers/tee/amdtee/call.c index 460b0c9e511f..3d25cee5c7d0 100644 --- a/drivers/tee/amdtee/call.c +++ b/drivers/tee/amdtee/call.c @@ -134,7 +134,7 @@ static u32 get_ta_refcount(u32 ta_handle) if (ta_data->ta_handle == ta_handle) return ++ta_data->refcount; - ta_data = kzalloc(sizeof(*ta_data), GFP_KERNEL); + ta_data = kzalloc_obj(*ta_data, GFP_KERNEL); if (ta_data) { ta_data->ta_handle = ta_handle; ta_data->refcount = 1; @@ -293,7 +293,7 @@ int handle_map_shmem(u32 count, struct shmem_desc *start, u32 *buf_id) if (!count || !start || !buf_id) return -EINVAL; - cmd = kzalloc(sizeof(*cmd), GFP_KERNEL); + cmd = kzalloc_obj(*cmd, GFP_KERNEL); if (!cmd) return -ENOMEM; diff --git a/drivers/tee/amdtee/core.c b/drivers/tee/amdtee/core.c index fb39d9a19c69..1ff4834722f7 100644 --- a/drivers/tee/amdtee/core.c +++ b/drivers/tee/amdtee/core.c @@ -38,7 +38,7 @@ static int amdtee_open(struct tee_context *ctx) { struct amdtee_context_data *ctxdata; - ctxdata = kzalloc(sizeof(*ctxdata), GFP_KERNEL); + ctxdata = kzalloc_obj(*ctxdata, GFP_KERNEL); if (!ctxdata) return -ENOMEM; @@ -122,7 +122,7 @@ static struct amdtee_session *alloc_session(struct amdtee_context_data *ctxdata, } /* Allocate a new session and add to list */ - sess = kzalloc(sizeof(*sess), GFP_KERNEL); + sess = kzalloc_obj(*sess, GFP_KERNEL); if (sess) { sess->ta_handle = ta_handle; kref_init(&sess->refcount); @@ -351,7 +351,7 @@ int amdtee_map_shmem(struct tee_shm *shm) if (!shm) return -EINVAL; - shmnode = kmalloc(sizeof(*shmnode), GFP_KERNEL); + shmnode = kmalloc_obj(*shmnode, GFP_KERNEL); if (!shmnode) return -ENOMEM; @@ -465,11 +465,11 @@ static int __init amdtee_driver_init(void) return rc; } - drv_data = kzalloc(sizeof(*drv_data), GFP_KERNEL); + drv_data = kzalloc_obj(*drv_data, GFP_KERNEL); if (!drv_data) return -ENOMEM; - amdtee = kzalloc(sizeof(*amdtee), GFP_KERNEL); + amdtee = kzalloc_obj(*amdtee, GFP_KERNEL); if (!amdtee) { rc = -ENOMEM; goto err_kfree_drv_data; diff --git a/drivers/tee/amdtee/shm_pool.c b/drivers/tee/amdtee/shm_pool.c index 6346e0bc8a64..fcb0d5da4bfd 100644 --- a/drivers/tee/amdtee/shm_pool.c +++ b/drivers/tee/amdtee/shm_pool.c @@ -59,7 +59,7 @@ static const struct tee_shm_pool_ops pool_ops = { struct tee_shm_pool *amdtee_config_shm(void) { - struct tee_shm_pool *pool = kzalloc(sizeof(*pool), GFP_KERNEL); + struct tee_shm_pool *pool = kzalloc_obj(*pool, GFP_KERNEL); if (!pool) return ERR_PTR(-ENOMEM); |
