]> www.infradead.org Git - users/jedix/linux-maple.git/commit
crypto: artpec6 - change from kzalloc to kcalloc in artpec6_crypto_probe()
authorEthan Carter Edwards <ethan@ethancedwards.com>
Sun, 9 Mar 2025 00:30:52 +0000 (19:30 -0500)
committerHerbert Xu <herbert@gondor.apana.org.au>
Sat, 15 Mar 2025 08:21:22 +0000 (16:21 +0800)
commit01894c8488d84138bd79311200ee5d9dd088b9d7
treeab6cfe63bd7bc01e12704640218ad297031ca2c2
parent37d451809f572ec197d3c18d9638c8715274255f
crypto: artpec6 - change from kzalloc to kcalloc in artpec6_crypto_probe()

We are trying to get rid of all multiplications from allocation
functions to prevent potential integer overflows. Here the
multiplication is probably safe, but using kcalloc() is more
appropriate and improves readability. This patch has no effect
on runtime behavior.

Link: https://github.com/KSPP/linux/issues/162
Link: https://www.kernel.org/doc/html/next/process/deprecated.html#open-coded-arithmetic-in-allocator-arguments
Signed-off-by: Ethan Carter Edwards <ethan@ethancedwards.com>
Acked-by: Jesper Nilsson <jesper.nilsson@axis.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
drivers/crypto/axis/artpec6_crypto.c