mirror of
https://github.com/torvalds/linux.git
synced 2024-11-13 07:31:45 +00:00
crypto/nx: Use kzalloc for workmem allocation
Send window is opened / closed for each crypto session. So initializes txwin in workmem. Signed-off-by: Haren Myneni <haren@us.ibm.com> Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
This commit is contained in:
parent
cd38a8a8a2
commit
f05368336b
@ -116,7 +116,7 @@ int nx842_crypto_init(struct crypto_tfm *tfm, struct nx842_driver *driver)
|
||||
|
||||
spin_lock_init(&ctx->lock);
|
||||
ctx->driver = driver;
|
||||
ctx->wmem = kmalloc(driver->workmem_size, GFP_KERNEL);
|
||||
ctx->wmem = kzalloc(driver->workmem_size, GFP_KERNEL);
|
||||
ctx->sbounce = (u8 *)__get_free_pages(GFP_KERNEL, BOUNCE_BUFFER_ORDER);
|
||||
ctx->dbounce = (u8 *)__get_free_pages(GFP_KERNEL, BOUNCE_BUFFER_ORDER);
|
||||
if (!ctx->wmem || !ctx->sbounce || !ctx->dbounce) {
|
||||
|
Loading…
Reference in New Issue
Block a user