Commit d6e7a7d0 authored by Markus Elfring's avatar Markus Elfring Committed by Herbert Xu

crypto: caam - Rename jump labels in ahash_setkey()

Adjust jump labels according to the current Linux coding style convention.
Signed-off-by: default avatarMarkus Elfring <elfring@users.sourceforge.net>
Signed-off-by: default avatarHerbert Xu <herbert@gondor.apana.org.au>
parent e7a33c4d
...@@ -533,7 +533,7 @@ static int ahash_setkey(struct crypto_ahash *ahash, ...@@ -533,7 +533,7 @@ static int ahash_setkey(struct crypto_ahash *ahash,
ret = hash_digest_key(ctx, key, &keylen, hashed_key, ret = hash_digest_key(ctx, key, &keylen, hashed_key,
digestsize); digestsize);
if (ret) if (ret)
goto badkey; goto bad_free_key;
key = hashed_key; key = hashed_key;
} }
...@@ -551,14 +551,14 @@ static int ahash_setkey(struct crypto_ahash *ahash, ...@@ -551,14 +551,14 @@ static int ahash_setkey(struct crypto_ahash *ahash,
ret = gen_split_hash_key(ctx, key, keylen); ret = gen_split_hash_key(ctx, key, keylen);
if (ret) if (ret)
goto badkey; goto bad_free_key;
ctx->key_dma = dma_map_single(jrdev, ctx->key, ctx->split_key_pad_len, ctx->key_dma = dma_map_single(jrdev, ctx->key, ctx->split_key_pad_len,
DMA_TO_DEVICE); DMA_TO_DEVICE);
if (dma_mapping_error(jrdev, ctx->key_dma)) { if (dma_mapping_error(jrdev, ctx->key_dma)) {
dev_err(jrdev, "unable to map key i/o memory\n"); dev_err(jrdev, "unable to map key i/o memory\n");
ret = -ENOMEM; ret = -ENOMEM;
goto map_err; goto error_free_key;
} }
#ifdef DEBUG #ifdef DEBUG
print_hex_dump(KERN_ERR, "ctx.key@"__stringify(__LINE__)": ", print_hex_dump(KERN_ERR, "ctx.key@"__stringify(__LINE__)": ",
...@@ -571,11 +571,10 @@ static int ahash_setkey(struct crypto_ahash *ahash, ...@@ -571,11 +571,10 @@ static int ahash_setkey(struct crypto_ahash *ahash,
dma_unmap_single(jrdev, ctx->key_dma, ctx->split_key_pad_len, dma_unmap_single(jrdev, ctx->key_dma, ctx->split_key_pad_len,
DMA_TO_DEVICE); DMA_TO_DEVICE);
} }
error_free_key:
map_err:
kfree(hashed_key); kfree(hashed_key);
return ret; return ret;
badkey: bad_free_key:
kfree(hashed_key); kfree(hashed_key);
crypto_ahash_set_flags(ahash, CRYPTO_TFM_RES_BAD_KEY_LEN); crypto_ahash_set_flags(ahash, CRYPTO_TFM_RES_BAD_KEY_LEN);
return -EINVAL; return -EINVAL;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment