[S390] use kzfree()
Johannes Weiner [Thu, 26 Mar 2009 14:24:48 +0000 (15:24 +0100)]
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>

arch/s390/crypto/prng.c
drivers/s390/crypto/zcrypt_pcixcc.c

index eca724d..b49c00c 100644 (file)
@@ -201,8 +201,7 @@ out_free:
 static void __exit prng_exit(void)
 {
        /* wipe me */
-       memset(p->buf, 0, prng_chunk_size);
-       kfree(p->buf);
+       kzfree(p->buf);
        kfree(p);
 
        misc_deregister(&prng_dev);
index e7a1e22..c20d479 100644 (file)
@@ -781,8 +781,7 @@ static long zcrypt_pcixcc_send_cprb(struct zcrypt_device *zdev,
                /* Signal pending. */
                ap_cancel_message(zdev->ap_dev, &ap_msg);
 out_free:
-       memset(ap_msg.message, 0x0, ap_msg.length);
-       kfree(ap_msg.message);
+       kzfree(ap_msg.message);
        return rc;
 }