mirror of
https://github.com/SCST-project/scst.git
synced 2026-05-17 02:31:27 +00:00
Replace memory allocation from kzalloc to kmalloc because
this memory buffer will be zeroed later on in the code. Signed-off-by: Dotan Barak <dotanba@gmail.com> git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@419 d57e44dd-8a1f-0410-8b47-8ef2f437770f
This commit is contained in:
@@ -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;
|
||||
|
||||
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user