diff mbox

DSPBRIDGE: Get rid of memset() from MEM_Calloc()

Message ID b487eb065323f57efcaea92d30f8cca5041589ee.1266334736.git.ameya.palande@nokia.com (mailing list archive)
State Accepted
Delegated to:
Headers show

Commit Message

Ameya Palande Feb. 16, 2010, 3:40 p.m. UTC
None
diff mbox

Patch

diff --git a/drivers/dsp/bridge/services/mem.c b/drivers/dsp/bridge/services/mem.c
index 614396e..2501eee 100644
--- a/drivers/dsp/bridge/services/mem.c
+++ b/drivers/dsp/bridge/services/mem.c
@@ -227,16 +227,13 @@  void *MEM_Calloc(u32 cBytes, enum MEM_POOLATTRS type)
 		case MEM_NONPAGED:
 		/* If non-paged memory required, see note at top of file. */
 		case MEM_PAGED:
-			pMem = kmalloc(cBytes,
+			pMem = kzalloc(cBytes,
 				(in_atomic()) ? GFP_ATOMIC : GFP_KERNEL);
-			if (pMem)
-				memset(pMem, 0, cBytes);
-
 			break;
 		case MEM_LARGEVIRTMEM:
-			pMem = vmalloc(cBytes);
-			if (pMem)
-				memset(pMem, 0, cBytes);
+			pMem = __vmalloc(cBytes,
+				GFP_KERNEL | __GFP_HIGHMEM | __GFP_ZERO,
+				PAGE_KERNEL);
 			break;
 		default:
 			GT_1trace(MEM_debugMask, GT_6CLASS,