]> git.baikalelectronics.ru Git - kernel.git/commit
crypto: atmel-tdes - Clarify how tdes dev gets allocated to the tfm
authorTudor Ambarus <tudor.ambarus@microchip.com>
Tue, 20 Jul 2021 08:55:27 +0000 (11:55 +0300)
committerHerbert Xu <herbert@gondor.apana.org.au>
Fri, 30 Jul 2021 02:58:31 +0000 (10:58 +0800)
commit3ddea712104ec7f2e317fae9bf614eb041761185
tree5c75befaaba9cbb761dfcb6f9e25deb66bdc1216
parent137dfe8b7eeae088b7adac548eb94e3812cb0493
crypto: atmel-tdes - Clarify how tdes dev gets allocated to the tfm

The tdes dev gets allocated to the tfm at alg->init time, there's no
need to overwrite the pointer to tdes_dd afterwards.
There's a single IP per SoC anyway, the first entry from the
atmel_tdes.dev_list is chosen without counting for tfms for example,
in case one thinks of an even distribution of tfms across the TDES
IPs: there's only one. At alg->init time the ctx->dd should already
be NULL, there's no need to check its value before requesting for a
tdes dev.

Signed-off-by: Tudor Ambarus <tudor.ambarus@microchip.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
drivers/crypto/atmel-tdes.c