mirror of
https://github.com/torvalds/linux
synced 2024-09-16 00:58:07 +00:00
s390/cpum_cf: remove unnecessary copy_from_user call
Struct s390_ctrset_read userdata is filled by ioctl_read operation using put_user/copy_to_user. However, the ctrset->data value access is not performed anywhere during the ioctl_read operation. Remove unnecessary copy_from_user() call. No functional change. Signed-off-by: Thomas Richter <tmricht@linux.ibm.com> Suggested-by: Sumanth Korikkar <sumanthk@linux.ibm.com> Acked-by: Sumanth Korikkar <sumanthk@linux.ibm.com> Signed-off-by: Vasily Gorbik <gor@linux.ibm.com>
This commit is contained in:
parent
3cdf0269cd
commit
26300860c2
|
@ -1388,14 +1388,10 @@ static int cfset_all_read(unsigned long arg, struct cfset_request *req)
|
|||
|
||||
static long cfset_ioctl_read(unsigned long arg, struct cfset_request *req)
|
||||
{
|
||||
struct s390_ctrset_read read;
|
||||
int ret = -ENODATA;
|
||||
|
||||
if (req && req->ctrset) {
|
||||
if (copy_from_user(&read, (char __user *)arg, sizeof(read)))
|
||||
return -EFAULT;
|
||||
if (req && req->ctrset)
|
||||
ret = cfset_all_read(arg, req);
|
||||
}
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue