diff options
author | Johannes Weiner <hannes@cmpxchg.org> | 2009-03-26 10:24:48 -0400 |
---|---|---|
committer | Martin Schwidefsky <schwidefsky@de.ibm.com> | 2009-03-26 10:24:29 -0400 |
commit | 3e75a902196c45d26d5e28014eb2d9821aa9794f (patch) | |
tree | a648c5fe545152a8fecdd0e773453e508082213c | |
parent | 6aa0d3a922c4f58fc36cc1502c6ac72f999e26bb (diff) |
[S390] use kzfree()
Use kzfree() instead of memset() + kfree().
Signed-off-by: Johannes Weiner <hannes@cmpxchg.org>
Reviewed-by: Pekka Enberg <penberg@cs.helsinki.fi>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
-rw-r--r-- | arch/s390/crypto/prng.c | 3 | ||||
-rw-r--r-- | drivers/s390/crypto/zcrypt_pcixcc.c | 3 |
2 files changed, 2 insertions, 4 deletions
diff --git a/arch/s390/crypto/prng.c b/arch/s390/crypto/prng.c index eca724d229ec..b49c00ce65e9 100644 --- a/arch/s390/crypto/prng.c +++ b/arch/s390/crypto/prng.c | |||
@@ -201,8 +201,7 @@ out_free: | |||
201 | static void __exit prng_exit(void) | 201 | static void __exit prng_exit(void) |
202 | { | 202 | { |
203 | /* wipe me */ | 203 | /* wipe me */ |
204 | memset(p->buf, 0, prng_chunk_size); | 204 | kzfree(p->buf); |
205 | kfree(p->buf); | ||
206 | kfree(p); | 205 | kfree(p); |
207 | 206 | ||
208 | misc_deregister(&prng_dev); | 207 | misc_deregister(&prng_dev); |
diff --git a/drivers/s390/crypto/zcrypt_pcixcc.c b/drivers/s390/crypto/zcrypt_pcixcc.c index e7a1e22e77ac..c20d4790258e 100644 --- a/drivers/s390/crypto/zcrypt_pcixcc.c +++ b/drivers/s390/crypto/zcrypt_pcixcc.c | |||
@@ -781,8 +781,7 @@ static long zcrypt_pcixcc_send_cprb(struct zcrypt_device *zdev, | |||
781 | /* Signal pending. */ | 781 | /* Signal pending. */ |
782 | ap_cancel_message(zdev->ap_dev, &ap_msg); | 782 | ap_cancel_message(zdev->ap_dev, &ap_msg); |
783 | out_free: | 783 | out_free: |
784 | memset(ap_msg.message, 0x0, ap_msg.length); | 784 | kzfree(ap_msg.message); |
785 | kfree(ap_msg.message); | ||
786 | return rc; | 785 | return rc; |
787 | } | 786 | } |
788 | 787 | ||