mmc: Fixing few warning messages.

CRs-Fixed: 313388
Change-Id: Ibf8ec6bc9eb7adff9bb6ac6af2a2f1af33a76bb8
Signed-off-by: Pratibhasagar V <pratibha@codeaurora.org>
diff --git a/drivers/mmc/host/msm_sdcc.c b/drivers/mmc/host/msm_sdcc.c
index b5a08d2..c1df55e 100644
--- a/drivers/mmc/host/msm_sdcc.c
+++ b/drivers/mmc/host/msm_sdcc.c
@@ -1634,7 +1634,7 @@
 		}
 	}
 
-	if (mrq->sbc) {
+	if (mrq->data && mrq->sbc) {
 		mrq->sbc->mrq = mrq;
 		mrq->sbc->data = mrq->data;
 		if (mrq->data->flags & MMC_DATA_WRITE) {
@@ -3000,6 +3000,12 @@
 						&sps_config->desc.phys_base,
 						GFP_KERNEL);
 
+	if (!sps_config->desc.base) {
+		rc = -ENOMEM;
+		pr_err("%s: dma_alloc_coherent() failed!!! Can't allocate buffer\n"
+			, mmc_hostname(host->mmc));
+		goto get_config_err;
+	}
 	memset(sps_config->desc.base, 0x00, sps_config->desc.size);
 
 	/* Establish connection between peripheral and memory endpoint */
@@ -3482,7 +3488,7 @@
 	struct resource *bam_memres = NULL;
 	struct resource *dmares = NULL;
 	struct resource *dma_crci_res = NULL;
-	int ret;
+	int ret = 0;
 	int i;
 
 	/* must have platform data */