mirror of
https://github.com/AuxXxilium/linux_dsm_epyc7002.git
synced 2024-11-24 12:40:53 +07:00
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: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: Ohad Ben-Cohen <ohad@wizery.com>
This commit is contained in:
parent
ae768d5fac
commit
bec109a430
@ -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')
|
||||
|
Loading…
Reference in New Issue
Block a user