diff options
author | Rijo Thomas <Rijo-john.Thomas@amd.com> | 2020-01-09 18:23:18 +0530 |
---|---|---|
committer | Herbert Xu <herbert@gondor.apana.org.au> | 2020-01-16 15:18:13 +0800 |
commit | 5ae63958a6dea78467c95f1669a4f0affa59935b (patch) | |
tree | 5f7dcab84bae204c508b755ed8d5248daca1ce32 /drivers/tee/amdtee/core.c | |
parent | crypto: vmx - reject xts inputs that are too short (diff) | |
download | wireguard-linux-5ae63958a6dea78467c95f1669a4f0affa59935b.tar.xz wireguard-linux-5ae63958a6dea78467c95f1669a4f0affa59935b.zip |
tee: amdtee: remove unused variable initialization
Remove unused variable initialization from driver code.
If enabled as a compiler option, compiler may throw warning for
unused assignments.
Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
Fixes: 757cc3e9ff1d ("tee: add AMD-TEE driver")
Signed-off-by: Rijo Thomas <Rijo-john.Thomas@amd.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Diffstat (limited to '')
-rw-r--r-- | drivers/tee/amdtee/core.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/drivers/tee/amdtee/core.c b/drivers/tee/amdtee/core.c index 9d0cee1c837f..b3f8235579f7 100644 --- a/drivers/tee/amdtee/core.c +++ b/drivers/tee/amdtee/core.c @@ -50,7 +50,7 @@ static int amdtee_open(struct tee_context *ctx) static void release_session(struct amdtee_session *sess) { - int i = 0; + int i; /* Close any open session */ for (i = 0; i < TEE_NUM_SESSIONS; ++i) { @@ -173,7 +173,7 @@ static int copy_ta_binary(struct tee_context *ctx, void *ptr, void **ta, u16 hi_ver; u8 seq_n[8]; } *uuid = ptr; - int n = 0, rc = 0; + int n, rc = 0; n = snprintf(fw_name, TA_PATH_MAX, "%s/%08x-%04x-%04x-%02x%02x%02x%02x%02x%02x%02x%02x.bin", @@ -219,9 +219,9 @@ int amdtee_open_session(struct tee_context *ctx, struct amdtee_context_data *ctxdata = ctx->data; struct amdtee_session *sess = NULL; u32 session_info; - void *ta = NULL; size_t ta_size; - int rc = 0, i; + int rc, i; + void *ta; if (arg->clnt_login != TEE_IOCTL_LOGIN_PUBLIC) { pr_err("unsupported client login method\n"); @@ -368,8 +368,8 @@ int amdtee_map_shmem(struct tee_shm *shm) void amdtee_unmap_shmem(struct tee_shm *shm) { + struct amdtee_shm_data *shmnode; u32 buf_id; - struct amdtee_shm_data *shmnode = NULL; if (!shm) return; @@ -434,9 +434,9 @@ static const struct tee_desc amdtee_desc = { static int __init amdtee_driver_init(void) { - struct amdtee *amdtee = NULL; struct tee_device *teedev; - struct tee_shm_pool *pool = ERR_PTR(-EINVAL); + struct tee_shm_pool *pool; + struct amdtee *amdtee; int rc; rc = psp_check_tee_status(); |