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

Commit b5102a01 authored by Surajit Podder's avatar Surajit Podder Committed by Haitao Nie
Browse files

msm: vidc: Check ion_handle for errors



When ion imports dma buf, it will return negative error number
in the case of failure like bad file number or invalid dma buf file.
check ion_handle for error numbers.

Change-Id: Iffca839c5fdc10aafe908016e1268b7634bdb99d
Signed-off-by: default avatarSurajit Podder <spodder@codeaurora.org>
parent 1376150f
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -476,7 +476,8 @@ bool msm_smem_compare_buffers(void *clt, int fd, void *priv)
	}
	handle = ion_import_dma_buf_fd(client->clnt, fd);
	ret = handle == priv;
	handle ? ion_free(client->clnt, handle) : 0;
	if (!IS_ERR_OR_NULL(handle))
		ion_free(client->clnt, handle);
	return ret;
}