msm: camera: Validate parameters before usage

Patch to check the parameters before usage.

CRs-Fixed: 981826
Change-Id: Ib27076507477f3949063963db503f734c49ab591
Signed-off-by: Azam Sadiq Pasha Kapatrala Syed <akapatra@codeaurora.org>
This commit is contained in:
Azam Sadiq Pasha Kapatrala Syed 2016-03-08 12:15:06 -08:00 committed by David Keitel
parent f40be251f9
commit 083fdefb71

View file

@ -827,7 +827,7 @@ static int cam_smmu_map_buffer_and_add_to_list(int idx, int ion_fd,
*paddr_ptr = sg_dma_address(table->sgl);
*len_ptr = (size_t)sg_dma_len(table->sgl);
if (!paddr_ptr) {
if (!*paddr_ptr || !*len_ptr) {
pr_err("Error: Space Allocation failed!\n");
rc = -ENOSPC;
goto err_unmap_sg;