crypto: amlogic - Remove kcalloc without check
authorChristophe JAILLET <christophe.jaillet@wanadoo.fr>
Tue, 22 Nov 2022 21:56:19 +0000 (22:56 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sat, 31 Dec 2022 12:14:25 +0000 (13:14 +0100)
commit815b65d714f82c68199d37d10fa55af16fe8f5e6
tree1559862710d0b463ea43d1d41d1d58c7d9b9d210
parentaf71199291dbb23fe2d6fce8555b3b310b28e7d5
crypto: amlogic - Remove kcalloc without check

[ Upstream commit 3d780c8a9850ad60dee47a8d971ba7888f3d1bd3 ]

There is no real point in allocating dedicated memory for the irqs array.
MAXFLOW is only 2, so it is easier to allocated the needed space
directly within the 'meson_dev' structure.

This saves some memory allocation and avoids an indirection when using the
irqs array.

Fixes: 48fe583fe541 ("crypto: amlogic - Add crypto accelerator...")
Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/crypto/amlogic/amlogic-gxl-core.c
drivers/crypto/amlogic/amlogic-gxl.h