]> pilppa.com Git - linux-2.6-omap-h63xx.git/commitdiff
[S390] use kzfree()
authorJohannes Weiner <hannes@cmpxchg.org>
Thu, 26 Mar 2009 14:24:48 +0000 (15:24 +0100)
committerMartin Schwidefsky <schwidefsky@de.ibm.com>
Thu, 26 Mar 2009 14:24:29 +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 eca724d229ecd26d7102dfd7c7d4be37af98d19f..b49c00ce65e92f4e0e9b584ce0c61e3aaaf37da1 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 e7a1e22e77acf82425b8a60c5d25426f83c6aca4..c20d4790258e247c9638f61a928bf4f578c163c8 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;
 }