summaryrefslogtreecommitdiffstats
path: root/drivers/crypto/atmel-sha.c
diff options
context:
space:
mode:
authorClaudiu Beznea <claudiu.beznea@microchip.com>2022-07-06 10:58:44 +0200
committerHerbert Xu <herbert@gondor.apana.org.au>2022-07-15 10:43:22 +0200
commitc6a16f4bbf5518603b51df23f23e46223244dcb0 (patch)
treeb3e6e6b860f314ec92467b2c7291eb2db80619b5 /drivers/crypto/atmel-sha.c
parentcrypto: caam/qi2 - switch to netif_napi_add_tx_weight() (diff)
downloadlinux-c6a16f4bbf5518603b51df23f23e46223244dcb0.tar.xz
linux-c6a16f4bbf5518603b51df23f23e46223244dcb0.zip
crypto: atmel-sha - initialize sha_dd while declaring
Initialize sha_dd with platform_get_drvdata() when declaring it. Signed-off-by: Claudiu Beznea <claudiu.beznea@microchip.com> Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Diffstat (limited to 'drivers/crypto/atmel-sha.c')
-rw-r--r--drivers/crypto/atmel-sha.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/drivers/crypto/atmel-sha.c b/drivers/crypto/atmel-sha.c
index e054e0ac6fc2..ca4b01926d1b 100644
--- a/drivers/crypto/atmel-sha.c
+++ b/drivers/crypto/atmel-sha.c
@@ -2666,9 +2666,7 @@ err_tasklet_kill:
static int atmel_sha_remove(struct platform_device *pdev)
{
- struct atmel_sha_dev *sha_dd;
-
- sha_dd = platform_get_drvdata(pdev);
+ struct atmel_sha_dev *sha_dd = platform_get_drvdata(pdev);
spin_lock(&atmel_sha.lock);
list_del(&sha_dd->list);