[PATCH] kfree cleanup: drivers/s390

This is the drivers/s390/ part of the big kfree cleanup patch.

Remove pointless checks for NULL prior to calling kfree() in drivers/s390/.

Signed-off-by: Jesper Juhl <jesper.juhl@gmail.com>
Acked-by: Cornelia Huck <cohuck@de.ibm.com>
Acked-by: Stefan Bader <Stefan.Bader@de.ibm.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
This commit is contained in:
Jesper Juhl
2005-11-07 01:01:30 -08:00
committed by Linus Torvalds
parent 3c7208f253
commit 17fd682e54
16 changed files with 44 additions and 86 deletions

View File

@@ -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));
}