Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

crypto: ixp4xx - silence uninitialized variable warning

Smatch complains that "dma" is uninitialized if dma_pool_alloc() fails.
This is true, but also harmless. Anyway, move the assignment after the
error checking to silence this warning.

Fixes: 586d492f2856 ("crypto: ixp4xx - fix building wiht 64-bit dma_addr_t")
Signed-off-by: Dan Carpenter <dan.carpenter@linaro.org>
Reviewed-by: Arnd Bergmann <arnd@arndb.de>
Acked-by: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>

authored by

Dan Carpenter and committed by
Herbert Xu
a4ca033d 3e522591

+1 -1
+1 -1
drivers/crypto/intel/ixp4xx/ixp4xx_crypto.c
··· 1175 1175 /* The 12 hmac bytes are scattered, 1176 1176 * we need to copy them into a safe buffer */ 1177 1177 req_ctx->hmac_virt = dma_pool_alloc(buffer_pool, flags, &dma); 1178 - crypt->icv_rev_aes = dma; 1179 1178 if (unlikely(!req_ctx->hmac_virt)) 1180 1179 goto free_buf_dst; 1180 + crypt->icv_rev_aes = dma; 1181 1181 if (!encrypt) { 1182 1182 scatterwalk_map_and_copy(req_ctx->hmac_virt, 1183 1183 req->src, cryptlen, authsize, 0);