crypto: ccree - use devm_kzalloc() for hash data
authorGeert Uytterhoeven <geert+renesas@glider.be>
Tue, 11 Feb 2020 18:19:28 +0000 (19:19 +0100)
committerHerbert Xu <herbert@gondor.apana.org.au>
Sat, 22 Feb 2020 01:25:46 +0000 (09:25 +0800)
commit91fc6c7b3328c6f72a37e7bc319eb8419f109be3
tree9a26aeb4578e517055cac7d95c54c7b5c5851eab
parentf7c8f992013da1afad6a353b7c73ea35c014d507
crypto: ccree - use devm_kzalloc() for hash data

As the lifetime of the hash data matches the lifetime of the driver,
hash data can be allocated using the managed allocators.
While at it, simplify cc_hash_free() by removing an unneeded check
(hash_handle is always valid here).

Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
drivers/crypto/ccree/cc_hash.c