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: atmel-ecc - Release client on allocation failure

Call atmel_ecc_i2c_client_free() to release the I2C client reserved by
atmel_ecc_i2c_client_alloc() when crypto_alloc_kpp() fails. Otherwise
->tfm_count will be out of sync.

Fixes: 11105693fa05 ("crypto: atmel-ecc - introduce Microchip / Atmel ECC driver")
Cc: stable@vger.kernel.org
Signed-off-by: Thorsten Blum <thorsten.blum@linux.dev>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>

authored by

Thorsten Blum and committed by
Herbert Xu
095d5000 de4e66b7

+1
+1
drivers/crypto/atmel-ecc.c
··· 261 261 if (IS_ERR(fallback)) { 262 262 dev_err(&ctx->client->dev, "Failed to allocate transformation for '%s': %ld\n", 263 263 alg, PTR_ERR(fallback)); 264 + atmel_ecc_i2c_client_free(ctx->client); 264 265 return PTR_ERR(fallback); 265 266 } 266 267