diff mbox series

[V2,4/9] crypto/nx: Initialize coproc entry with kzalloc

Message ID 1582974902.18705.46.camel@hbabu-laptop (mailing list archive)
State Superseded
Headers show
Series crypto/nx: Enable GZIP engine and provide userpace API | expand

Checks

Context Check Description
snowpatch_ozlabs/apply_patch warning Failed to apply on branch powerpc/merge (e3a1ab299346a9a415f334e91a78da7ea84aa5a2)
snowpatch_ozlabs/apply_patch warning Failed to apply on branch powerpc/next (71c3a888cbcaf453aecf8d2f8fb003271d28073f)
snowpatch_ozlabs/apply_patch warning Failed to apply on branch linus/master (29795de0d242a5ba45904b36a5fb67e38a304cb7)
snowpatch_ozlabs/apply_patch warning Failed to apply on branch powerpc/fixes (cb0cc635c7a9fa8a3a0f75d4d896721819c63add)
snowpatch_ozlabs/apply_patch warning Failed to apply on branch linux-next (770fbb32d34e5d6298cc2be590c9d2fd6069aa17)
snowpatch_ozlabs/apply_patch fail Failed to apply to any branch

Commit Message

Haren Myneni Feb. 29, 2020, 11:15 a.m. UTC
coproc entry is initialized during NX probe on power9, but not on P8.
nx842_delete_coprocs() is used for both and frees receive window if it
is allocated. Getting crash for rmmod on P8 since coproc->vas.rxwin
is not initialized.

This patch replaces kmalloc with kzalloc in nx842_powernv_probe()

Signed-off-by: Haren Myneni <haren@linux.ibm.com>
---
 drivers/crypto/nx/nx-842-powernv.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
diff mbox series

Patch

diff --git a/drivers/crypto/nx/nx-842-powernv.c b/drivers/crypto/nx/nx-842-powernv.c
index c037a24..8e63326 100644
--- a/drivers/crypto/nx/nx-842-powernv.c
+++ b/drivers/crypto/nx/nx-842-powernv.c
@@ -922,7 +922,7 @@  static int __init nx842_powernv_probe(struct device_node *dn)
 		return -EINVAL;
 	}
 
-	coproc = kmalloc(sizeof(*coproc), GFP_KERNEL);
+	coproc = kzalloc(sizeof(*coproc), GFP_KERNEL);
 	if (!coproc)
 		return -ENOMEM;