platform: msm_shared: Add ASSERT for the dynamically allocated pointers.

Add ASSERT for the pointers like ept, reg and epts in case they were not
allocated successfully before using.

CRs-Fixed: 687723
Change-Id: I5fdbb34153a77e56f0fb4ef8506f2e2f03513cff
diff --git a/platform/msm_shared/hsusb.c b/platform/msm_shared/hsusb.c
index c9ae3b2..49da56c 100644
--- a/platform/msm_shared/hsusb.c
+++ b/platform/msm_shared/hsusb.c
@@ -159,6 +159,7 @@
 	unsigned cfg;
 
 	ept = memalign(CACHE_LINE, ROUNDUP(sizeof(*ept), CACHE_LINE));
+	ASSERT(ept);
 
 	ept->maxpkt = max_pkt;
 	ept->num = num;
@@ -249,6 +250,7 @@
 {
 	struct usb_request *req;
 	req = memalign(CACHE_LINE, ROUNDUP(sizeof(*req), CACHE_LINE));
+	ASSERT(req);
 	req->req.buf = 0;
 	req->req.length = 0;
 	req->item = memalign(CACHE_LINE, ROUNDUP(sizeof(struct ept_queue_item),
@@ -693,6 +695,7 @@
 	writel(0x08, USB_AHB_MODE);
 
 	epts = memalign(lcm(4096, CACHE_LINE), ROUNDUP(4096, CACHE_LINE));
+	ASSERT(epts);
 
 	dprintf(INFO, "USB init ept @ %p\n", epts);
 	memset(epts, 0, 32 * sizeof(struct ept_queue_head));