diff options
author | Jesper Juhl <jesper.juhl@gmail.com> | 2005-11-07 04:01:30 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@g5.osdl.org> | 2005-11-07 10:54:03 -0500 |
commit | 17fd682e544556a2a829e94383239c029bb21c5e (patch) | |
tree | 4b78bdd36efdbf9fb2c4c11382ed88898ceec48c /drivers/s390/crypto | |
parent | 3c7208f253571ee5f157b98f0e315b5172afe092 (diff) |
[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>
Diffstat (limited to 'drivers/s390/crypto')
-rw-r--r-- | drivers/s390/crypto/z90main.c | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/drivers/s390/crypto/z90main.c b/drivers/s390/crypto/z90main.c index 0cb47eca91f3..04c2ef778ec6 100644 --- a/drivers/s390/crypto/z90main.c +++ b/drivers/s390/crypto/z90main.c | |||
@@ -3051,8 +3051,7 @@ destroy_crypto_device(int index) | |||
3051 | if (dev_ptr) { | 3051 | if (dev_ptr) { |
3052 | disabledFlag = dev_ptr->disabled; | 3052 | disabledFlag = dev_ptr->disabled; |
3053 | t = dev_ptr->dev_type; | 3053 | t = dev_ptr->dev_type; |
3054 | if (dev_ptr->dev_resp_p) | 3054 | kfree(dev_ptr->dev_resp_p); |
3055 | kfree(dev_ptr->dev_resp_p); | ||
3056 | kfree(dev_ptr); | 3055 | kfree(dev_ptr); |
3057 | } else { | 3056 | } else { |
3058 | disabledFlag = 0; | 3057 | disabledFlag = 0; |
@@ -3080,11 +3079,11 @@ static void | |||
3080 | destroy_z90crypt(void) | 3079 | destroy_z90crypt(void) |
3081 | { | 3080 | { |
3082 | int i; | 3081 | int i; |
3082 | |||
3083 | for (i = 0; i < z90crypt.max_count; i++) | 3083 | for (i = 0; i < z90crypt.max_count; i++) |
3084 | if (z90crypt.device_p[i]) | 3084 | if (z90crypt.device_p[i]) |
3085 | destroy_crypto_device(i); | 3085 | destroy_crypto_device(i); |
3086 | if (z90crypt.hdware_info) | 3086 | kfree(z90crypt.hdware_info); |
3087 | kfree((void *)z90crypt.hdware_info); | ||
3088 | memset((void *)&z90crypt, 0, sizeof(z90crypt)); | 3087 | memset((void *)&z90crypt, 0, sizeof(z90crypt)); |
3089 | } | 3088 | } |
3090 | 3089 | ||