From 49985389790deca6b03bea129f27aa69a8968e79 Mon Sep 17 00:00:00 2001 From: Vladislav Bolkhovitin Date: Thu, 19 Jun 2008 17:54:25 +0000 Subject: [PATCH] Replace memory allocation from kzalloc to kmalloc because this memory buffer will be zeroed later on in the code. Signed-off-by: Dotan Barak git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@419 d57e44dd-8a1f-0410-8b47-8ef2f437770f --- scst/src/dev_handlers/scst_cdrom.c | 2 +- scst/src/dev_handlers/scst_modisk.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/scst/src/dev_handlers/scst_cdrom.c b/scst/src/dev_handlers/scst_cdrom.c index abc705731..121477392 100644 --- a/scst/src/dev_handlers/scst_cdrom.c +++ b/scst/src/dev_handlers/scst_cdrom.c @@ -90,7 +90,7 @@ int cdrom_attach(struct scst_device *dev) goto out; } - buffer = kzalloc(buffer_size, GFP_KERNEL); + buffer = kmalloc(buffer_size, GFP_KERNEL); if (!buffer) { TRACE(TRACE_OUT_OF_MEM, "%s", "Memory allocation failure"); res = -ENOMEM; diff --git a/scst/src/dev_handlers/scst_modisk.c b/scst/src/dev_handlers/scst_modisk.c index 2ba8ab25b..8bd0a2d1b 100644 --- a/scst/src/dev_handlers/scst_modisk.c +++ b/scst/src/dev_handlers/scst_modisk.c @@ -177,7 +177,7 @@ int modisk_attach(struct scst_device *dev) goto out_free_params; } - buffer = kzalloc(buffer_size, GFP_KERNEL); + buffer = kmalloc(buffer_size, GFP_KERNEL); if (!buffer) { TRACE(TRACE_OUT_OF_MEM, "%s", "Memory allocation failure"); res = -ENOMEM;