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

Commit bec109a4 authored by Dan Carpenter's avatar Dan Carpenter Committed by Ohad Ben-Cohen
Browse files

remoteproc: return -EFAULT on copy_from_user failure



copy_from_user() returns the number of bytes remaining to be copied, but
we want to return an error code here.

Signed-off-by: default avatarDan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: default avatarOhad Ben-Cohen <ohad@wizery.com>
parent ae768d5f
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -161,7 +161,7 @@ rproc_recovery_write(struct file *filp, const char __user *user_buf,

	ret = copy_from_user(buf, user_buf, count);
	if (ret)
		return ret;
		return -EFAULT;

	/* remove end of line */
	if (buf[count - 1] == '\n')