platform: msm_shared: assert if buffer is not NULL

Check if it is not successfully malloced the buffer.

CRs-Fixed: 687723
Change-Id: I4749c4f37caaa85dcc1e387305bdfe2f1c2e409b
diff --git a/platform/msm_shared/qpic_nand.c b/platform/msm_shared/qpic_nand.c
index f638e37..0c858d9 100644
--- a/platform/msm_shared/qpic_nand.c
+++ b/platform/msm_shared/qpic_nand.c
@@ -607,6 +607,7 @@
 
 	/* Allocate memory required to read the onfi param page */
 	buffer = (unsigned char*) malloc(ONFI_READ_PARAM_PAGE_BUFFER_SIZE);
+	ASSERT(buffer != NULL);
 
 	/* Read the vld and dev_cmd1 registers before modifying */
 	vld = qpic_nand_read_reg(NAND_DEV_CMD_VLD, 0, ce_array);