From c6a16f4bbf5518603b51df23f23e46223244dcb0 Mon Sep 17 00:00:00 2001 From: Claudiu Beznea Date: Wed, 6 Jul 2022 11:58:44 +0300 Subject: [PATCH] crypto: atmel-sha - initialize sha_dd while declaring Initialize sha_dd with platform_get_drvdata() when declaring it. Signed-off-by: Claudiu Beznea Signed-off-by: Herbert Xu --- drivers/crypto/atmel-sha.c | 4 +--- 1 file changed, 1 insertion(+), 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);