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

Commit 3179ce72 authored by Richard Weinberger's avatar Richard Weinberger
Browse files

um: Fix return value of strnlen_user()



In case of an error it must not return -EFAULT.
Return 0 like all other archs do.

Reported-by: default avatar <toralf.foerster@gmx.de>
Signed-off-by: default avatarRichard Weinberger <richard@nod.at>
parent ecb2cf1a
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -254,6 +254,6 @@ int strnlen_user(const void __user *str, int len)
	n = buffer_op((unsigned long) str, len, 0, strnlen_chunk, &count);
	if (n == 0)
		return count + 1;
	return -EFAULT;
	return 0;
}
EXPORT_SYMBOL(strnlen_user);