diff options
-rw-r--r-- | drivers/gpu/drm/drm_ioctl.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/drivers/gpu/drm/drm_ioctl.c b/drivers/gpu/drm/drm_ioctl.c index 68ba014886c2..4a2bf2b857ec 100644 --- a/drivers/gpu/drm/drm_ioctl.c +++ b/drivers/gpu/drm/drm_ioctl.c | |||
@@ -683,9 +683,8 @@ long drm_ioctl(struct file *filp, | |||
683 | } | 683 | } |
684 | 684 | ||
685 | drv_size = _IOC_SIZE(ioctl->cmd); | 685 | drv_size = _IOC_SIZE(ioctl->cmd); |
686 | usize = asize = _IOC_SIZE(cmd); | 686 | usize = _IOC_SIZE(cmd); |
687 | if (drv_size > asize) | 687 | asize = max(usize, drv_size); |
688 | asize = drv_size; | ||
689 | cmd = ioctl->cmd; | 688 | cmd = ioctl->cmd; |
690 | 689 | ||
691 | DRM_DEBUG("pid=%d, dev=0x%lx, auth=%d, %s\n", | 690 | DRM_DEBUG("pid=%d, dev=0x%lx, auth=%d, %s\n", |