diff options
author | Geert Uytterhoeven <geert+renesas@glider.be> | 2020-02-11 19:19:26 +0100 |
---|---|---|
committer | Herbert Xu <herbert@gondor.apana.org.au> | 2020-02-22 02:25:46 +0100 |
commit | ff4d719a5bc7e27eac7002ea6eaea05fa2deb87a (patch) | |
tree | 3957ebc9969112a1c9cb73057681870530b1d811 /drivers/crypto/ccree/cc_cipher.c | |
parent | crypto: ccree - use existing dev helper in init_cc_resources() (diff) | |
download | linux-ff4d719a5bc7e27eac7002ea6eaea05fa2deb87a.tar.xz linux-ff4d719a5bc7e27eac7002ea6eaea05fa2deb87a.zip |
crypto: ccree - use devm_k[mz]alloc() for AEAD data
As the lifetime of the AEAD data matches the lifetime of the driver,
AEAD data can be allocated using the managed allocators.
While at it, simplify cc_aead_free() by removing an unneeded cast, and
an unneeded check (aead_handle is always valid here).
Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Diffstat (limited to 'drivers/crypto/ccree/cc_cipher.c')
-rw-r--r-- | drivers/crypto/ccree/cc_cipher.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/drivers/crypto/ccree/cc_cipher.c b/drivers/crypto/ccree/cc_cipher.c index d219b5b5d7b4..fc6df7183024 100644 --- a/drivers/crypto/ccree/cc_cipher.c +++ b/drivers/crypto/ccree/cc_cipher.c @@ -1705,11 +1705,11 @@ int cc_cipher_alloc(struct cc_drvdata *drvdata) t_alg->skcipher_alg.base.cra_driver_name); kfree(t_alg); goto fail0; - } else { - list_add_tail(&t_alg->entry, &drvdata->alg_list); - dev_dbg(dev, "Registered %s\n", - t_alg->skcipher_alg.base.cra_driver_name); } + + list_add_tail(&t_alg->entry, &drvdata->alg_list); + dev_dbg(dev, "Registered %s\n", + t_alg->skcipher_alg.base.cra_driver_name); } return 0; |