summaryrefslogtreecommitdiffstats
path: root/drivers/s390/crypto/z90main.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/s390/crypto/z90main.c')
-rw-r--r--drivers/s390/crypto/z90main.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/drivers/s390/crypto/z90main.c b/drivers/s390/crypto/z90main.c
index 0cb47ec..04c2ef7 100644
--- a/drivers/s390/crypto/z90main.c
+++ b/drivers/s390/crypto/z90main.c
@@ -3051,8 +3051,7 @@ destroy_crypto_device(int index)
if (dev_ptr) {
disabledFlag = dev_ptr->disabled;
t = dev_ptr->dev_type;
- if (dev_ptr->dev_resp_p)
- kfree(dev_ptr->dev_resp_p);
+ kfree(dev_ptr->dev_resp_p);
kfree(dev_ptr);
} else {
disabledFlag = 0;
@@ -3080,11 +3079,11 @@ static void
destroy_z90crypt(void)
{
int i;
+
for (i = 0; i < z90crypt.max_count; i++)
if (z90crypt.device_p[i])
destroy_crypto_device(i);
- if (z90crypt.hdware_info)
- kfree((void *)z90crypt.hdware_info);
+ kfree(z90crypt.hdware_info);
memset((void *)&z90crypt, 0, sizeof(z90crypt));
}
OpenPOWER on IntegriCloud