Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit ea9b8bd4 authored by Maheshwar Ajja's avatar Maheshwar Ajja
Browse files

msm: vidc: Check the return type of ION API properly



Add proper check condition for the return type of function
ion_map_kernel() to avoid kernel panic afterwards.

Change-Id: Iead1c55895e643b9e803b109878ad39aeaeb202e
CRs-fixed: 667255
Signed-off-by: default avatarMaheshwar Ajja <majja@codeaurora.org>
parent 3fc0e794
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -235,7 +235,7 @@ static int alloc_ion_mem(struct smem_client *client, size_t size, u32 align,
	mem->buffer_type = buffer_type;
	if (map_kernel) {
		mem->kvaddr = ion_map_kernel(client->clnt, hndl);
		if (!mem->kvaddr) {
		if (IS_ERR(mem->kvaddr) || !mem->kvaddr) {
			dprintk(VIDC_ERR,
				"Failed to map shared mem in kernel\n");
			rc = -EIO;