gpu: nvgpu: fix -EINVAL retval in ioctls

Proper error number for invalid request number is EINVAL instead of
EFAULT, so change it in ioctl calls.

Change-Id: I8fddd34e012700550e9e30fe17ba7152b3a0417b
Signed-off-by: Konsta Holtta <kholtta@nvidia.com>
Reviewed-on: http://git-master/r/542563
Reviewed-by: Automatic_Commit_Validation_User
GVS: Gerrit_Virtual_Submit
Reviewed-by: Terje Bergstrom <tbergstrom@nvidia.com>
This commit is contained in:
Konsta Holtta
2014-09-29 10:37:33 +03:00
committed by Dan Willemsen
parent 435cf045d7
commit 6b85e32d6c
5 changed files with 5 additions and 5 deletions

View File

@@ -2220,7 +2220,7 @@ long gk20a_channel_ioctl(struct file *filp,
(_IOC_NR(cmd) == 0) ||
(_IOC_NR(cmd) > NVHOST_IOCTL_CHANNEL_LAST) ||
(_IOC_SIZE(cmd) > NVHOST_IOCTL_CHANNEL_MAX_ARG_SIZE))
return -EFAULT;
return -EINVAL;
if (_IOC_DIR(cmd) & _IOC_WRITE) {
if (copy_from_user(buf, (void __user *)arg, _IOC_SIZE(cmd)))