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)
commit632a761abb29db2c541782b9fe1f1e8d6f833896
tree5c75befaaba9cbb761dfcb6f9e25deb66bdc1216
parenta7fc80bb22eb0f13791ee4f70484e88316cc2a24
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