msm: camera: correct error checking in case of failed allocation.

Signed-off-by: Ankit Premrajka <ankitp@codeaurora.org>
diff --git a/drivers/media/video/videobuf-msm-mem.c b/drivers/media/video/videobuf-msm-mem.c
index 13265bf..5646f9f 100644
--- a/drivers/media/video/videobuf-msm-mem.c
+++ b/drivers/media/video/videobuf-msm-mem.c
@@ -284,7 +284,7 @@
 	buf->bsize = mem->size;
 	mem->phyaddr = msm_mem_allocate(mem->size);
 
-	if (IS_ERR((void *)mem->phyaddr)) {
+	if (!mem->phyaddr) {
 		pr_err("%s : pmem memory allocation failed\n", __func__);
 		goto error;
 	}
diff --git a/drivers/media/video/videobuf2-msm-mem.c b/drivers/media/video/videobuf2-msm-mem.c
index 4159056..388dca2 100644
--- a/drivers/media/video/videobuf2-msm-mem.c
+++ b/drivers/media/video/videobuf2-msm-mem.c
@@ -93,7 +93,7 @@
 	mem->alloc_ctx = alloc_ctx;
 	mem->is_userptr = 0;
 	mem->phyaddr = msm_mem_allocate(mem->size);
-	if (IS_ERR((void *)mem->phyaddr)) {
+	if (!mem->phyaddr) {
 		pr_err("%s : pmem memory allocation failed\n", __func__);
 		kfree(mem);
 		return ERR_PTR(-ENOMEM);