aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTadeusz Struk <tadeusz.struk@intel.com>2016-05-17 13:53:51 -0400
committerHerbert Xu <herbert@gondor.apana.org.au>2016-05-31 04:41:48 -0400
commit21a3d3b234cd170deded6beb42409f2a9cd01917 (patch)
tree2f285570e080f4b5c57121b218612edcf3a87852
parenteed1e1afd8d542d9644534c1b712599b5d680007 (diff)
crypto: qat - fix typos sizeof for ctx
The sizeof(*ctx->dec_cd) and sizeof(*ctx->enc_cd) are equal, but we should use the correct one for freeing memory anyway. Signed-off-by: Tadeusz Struk <tadeusz.struk@intel.com> Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
-rw-r--r--drivers/crypto/qat/qat_common/qat_algs.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/drivers/crypto/qat/qat_common/qat_algs.c b/drivers/crypto/qat/qat_common/qat_algs.c
index 1e8852a8a057..769148dbaeb3 100644
--- a/drivers/crypto/qat/qat_common/qat_algs.c
+++ b/drivers/crypto/qat/qat_common/qat_algs.c
@@ -947,13 +947,13 @@ static int qat_alg_ablkcipher_setkey(struct crypto_ablkcipher *tfm,
947 return 0; 947 return 0;
948 948
949out_free_all: 949out_free_all:
950 memset(ctx->dec_cd, 0, sizeof(*ctx->enc_cd)); 950 memset(ctx->dec_cd, 0, sizeof(*ctx->dec_cd));
951 dma_free_coherent(dev, sizeof(*ctx->enc_cd), 951 dma_free_coherent(dev, sizeof(*ctx->dec_cd),
952 ctx->dec_cd, ctx->dec_cd_paddr); 952 ctx->dec_cd, ctx->dec_cd_paddr);
953 ctx->dec_cd = NULL; 953 ctx->dec_cd = NULL;
954out_free_enc: 954out_free_enc:
955 memset(ctx->enc_cd, 0, sizeof(*ctx->dec_cd)); 955 memset(ctx->enc_cd, 0, sizeof(*ctx->enc_cd));
956 dma_free_coherent(dev, sizeof(*ctx->dec_cd), 956 dma_free_coherent(dev, sizeof(*ctx->enc_cd),
957 ctx->enc_cd, ctx->enc_cd_paddr); 957 ctx->enc_cd, ctx->enc_cd_paddr);
958 ctx->enc_cd = NULL; 958 ctx->enc_cd = NULL;
959 return -ENOMEM; 959 return -ENOMEM;