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

Commit 0dc00b42 authored by Karthikeyan Periasamy's avatar Karthikeyan Periasamy
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.

CRs-Fixed: 1071602
Change-Id: I1ea93161b85deb667cbb6f8515ff7c6943da6e3d
Signed-off-by: default avatarKarthikeyan Periasamy <kperiasa@codeaurora.org>
parent 67598d84
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -475,7 +475,7 @@ bool msm_smem_compare_buffers(void *clt, int fd, void *priv)
	}
	handle = ion_import_dma_buf(client->clnt, fd);
	ret = handle == priv;
	handle ? ion_free(client->clnt, handle) : 0;
	(!IS_ERR_OR_NULL(handle)) ? ion_free(client->clnt, handle) : 0;
	return ret;
}