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

Commit 93a52180 authored by Jordan Crouse's avatar Jordan Crouse
Browse files

msm: kgsl: Fix a sign mismatch in memdesc_sg_virt



get_user_pages returns a signed long but we do all of our math
with unsigned longs so cast the return value to the appropriate
type for a comparison.

Change-Id: Ic0dedbad0c931c2440929c615879a288d2f13828
Signed-off-by: default avatarJordan Crouse <jcrouse@codeaurora.org>
parent 276e19df
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -2719,7 +2719,7 @@ static int memdesc_sg_virt(struct kgsl_memdesc *memdesc, struct file *vmfile)
	if (ret)
		goto out;

	if (npages != sglen) {
	if ((unsigned long) npages != sglen) {
		ret = -EINVAL;
		goto out;
	}