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:
parent
f40be251f9
commit
083fdefb71
1 changed files with 1 additions and 1 deletions
|
@ -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;
|
||||
|
|
Loading…
Add table
Reference in a new issue