diff options
Diffstat (limited to 'drivers/gpu/nvgpu/gk20a/as_gk20a.c')
-rw-r--r-- | drivers/gpu/nvgpu/gk20a/as_gk20a.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/gpu/nvgpu/gk20a/as_gk20a.c b/drivers/gpu/nvgpu/gk20a/as_gk20a.c index 34423d21..cd5cdd48 100644 --- a/drivers/gpu/nvgpu/gk20a/as_gk20a.c +++ b/drivers/gpu/nvgpu/gk20a/as_gk20a.c | |||
@@ -265,6 +265,7 @@ long gk20a_as_dev_ioctl(struct file *filp, unsigned int cmd, unsigned long arg) | |||
265 | 265 | ||
266 | BUG_ON(_IOC_SIZE(cmd) > NVGPU_AS_IOCTL_MAX_ARG_SIZE); | 266 | BUG_ON(_IOC_SIZE(cmd) > NVGPU_AS_IOCTL_MAX_ARG_SIZE); |
267 | 267 | ||
268 | memset(buf, 0, sizeof(buf)); | ||
268 | if (_IOC_DIR(cmd) & _IOC_WRITE) { | 269 | if (_IOC_DIR(cmd) & _IOC_WRITE) { |
269 | if (copy_from_user(buf, (void __user *)arg, _IOC_SIZE(cmd))) | 270 | if (copy_from_user(buf, (void __user *)arg, _IOC_SIZE(cmd))) |
270 | return -EFAULT; | 271 | return -EFAULT; |