The net result is the same and it makes more clear some problems with freeing this memory (addressed in a later patch)
Signed-off-by: Cristian Stoica <cristian.sto...@freescale.com> --- ioctl.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/ioctl.c b/ioctl.c index 9cabb66..e918e8d 100644 --- a/ioctl.c +++ b/ioctl.c @@ -451,11 +451,10 @@ cryptodev_open(struct inode *inode, struct file *filp) struct crypt_priv *pcr; int i; - pcr = kmalloc(sizeof(*pcr), GFP_KERNEL); + pcr = kzalloc(sizeof(*pcr), GFP_KERNEL); if (!pcr) return -ENOMEM; - memset(pcr, 0, sizeof(*pcr)); mutex_init(&pcr->fcrypt.sem); INIT_LIST_HEAD(&pcr->fcrypt.list); -- 1.7.11.7 _______________________________________________ Cryptodev-linux-devel mailing list Cryptodev-linux-devel@gna.org https://mail.gna.org/listinfo/cryptodev-linux-devel