Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1484253
| From | SF Markus Elfring <elfring@users.sourceforge.net> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | [PATCH 2/6] crypto-caamhash: Rename jump labels in ahash_setkey() |
| Date | 2016-09-15 16:50 +0200 |
| Message-ID | <shG9c-8fB-33@gated-at.bofh.it> (permalink) |
| References | <qEuGl-43C-5@gated-at.bofh.it> <shFZw-8bW-27@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
From: Markus Elfring <elfring@users.sourceforge.net>
Date: Thu, 15 Sep 2016 13:54:49 +0200
Adjust jump labels according to the current Linux coding style convention.
Signed-off-by: Markus Elfring <elfring@users.sourceforge.net>
---
drivers/crypto/caam/caamhash.c | 11 +++++------
1 file changed, 5 insertions(+), 6 deletions(-)
diff --git a/drivers/crypto/caam/caamhash.c b/drivers/crypto/caam/caamhash.c
index f19df8f..6017470 100644
--- a/drivers/crypto/caam/caamhash.c
+++ b/drivers/crypto/caam/caamhash.c
@@ -533,7 +533,7 @@ static int ahash_setkey(struct crypto_ahash *ahash,
ret = hash_digest_key(ctx, key, &keylen, hashed_key,
digestsize);
if (ret)
- goto badkey;
+ goto bad_free_key;
key = hashed_key;
}
@@ -551,14 +551,14 @@ static int ahash_setkey(struct crypto_ahash *ahash,
ret = gen_split_hash_key(ctx, key, keylen);
if (ret)
- goto badkey;
+ goto bad_free_key;
ctx->key_dma = dma_map_single(jrdev, ctx->key, ctx->split_key_pad_len,
DMA_TO_DEVICE);
if (dma_mapping_error(jrdev, ctx->key_dma)) {
dev_err(jrdev, "unable to map key i/o memory\n");
ret = -ENOMEM;
- goto map_err;
+ goto error_free_key;
}
#ifdef DEBUG
print_hex_dump(KERN_ERR, "ctx.key@"__stringify(__LINE__)": ",
@@ -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_TO_DEVICE);
}
-
-map_err:
+ error_free_key:
kfree(hashed_key);
return ret;
-badkey:
+ bad_free_key:
kfree(hashed_key);
crypto_ahash_set_flags(ahash, CRYPTO_TFM_RES_BAD_KEY_LEN);
return -EINVAL;
--
2.10.0
Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
crypto-caamhash: Fine-tuning for several function implementations SF Markus Elfring <elfring@users.sourceforge.net> - 2016-09-15 16:40 +0200
[PATCH 6/6] crypto-caamhash: Move common error handling code in two functions SF Markus Elfring <elfring@users.sourceforge.net> - 2016-09-15 16:50 +0200
[PATCH 1/6] crypto-caamhash: Use kmalloc_array() in ahash_setkey() SF Markus Elfring <elfring@users.sourceforge.net> - 2016-09-15 16:50 +0200
Re: [PATCH 1/6] crypto-caamhash: Use kmalloc_array() in ahash_setkey() Horia Geanta Neag <horia.geanta@nxp.com> - 2016-09-16 04:00 +0200
[PATCH 2/6] crypto-caamhash: Rename jump labels in ahash_setkey() SF Markus Elfring <elfring@users.sourceforge.net> - 2016-09-15 16:50 +0200
[PATCH 3/6] crypto-caamhash: Rename a jump label in five functions SF Markus Elfring <elfring@users.sourceforge.net> - 2016-09-15 16:50 +0200
[PATCH 5/6] crypto-caamhash: Delete an unnecessary initialisation in seven functions SF Markus Elfring <elfring@users.sourceforge.net> - 2016-09-15 16:50 +0200
[PATCH 4/6] crypto-caamhash: Return a value directly in caam_hash_cra_init() SF Markus Elfring <elfring@users.sourceforge.net> - 2016-09-15 16:50 +0200
Re: crypto-caamhash: Fine-tuning for several function implementations Horia Geanta Neag <horia.geanta@nxp.com> - 2016-09-15 22:10 +0200
Re: crypto-caamhash: Fine-tuning for several function implementations Herbert Xu <herbert@gondor.apana.org.au> - 2016-09-22 12:50 +0200
csiph-web