summaryrefslogtreecommitdiff
path: root/drivers/gpu
diff options
context:
space:
mode:
authorAl Viro <viro@zeniv.linux.org.uk>2017-05-25 23:27:27 +0300
committerAl Viro <viro@zeniv.linux.org.uk>2017-07-04 20:16:26 +0300
commit88e3cb07857584a20f66dce5e4a21b43ebbc967e (patch)
treec1efaa239c9cb7d793ab4310ba275657cb58e78f /drivers/gpu
parent87d3ce1169d329bc4cab41996fccb68c06b5725b (diff)
downloadlinux-88e3cb07857584a20f66dce5e4a21b43ebbc967e.tar.xz
drm_compat_ioctl(): tidy up a bit
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Diffstat (limited to 'drivers/gpu')
-rw-r--r--drivers/gpu/drm/drm_ioc32.c22
1 files changed, 9 insertions, 13 deletions
diff --git a/drivers/gpu/drm/drm_ioc32.c b/drivers/gpu/drm/drm_ioc32.c
index 0e6ae9ceceb6..7101b5141f00 100644
--- a/drivers/gpu/drm/drm_ioc32.c
+++ b/drivers/gpu/drm/drm_ioc32.c
@@ -951,6 +951,7 @@ static struct {
long drm_compat_ioctl(struct file *filp, unsigned int cmd, unsigned long arg)
{
unsigned int nr = DRM_IOCTL_NR(cmd);
+ struct drm_file *file_priv = filp->private_data;
drm_ioctl_compat_t *fn;
int ret;
@@ -965,19 +966,14 @@ long drm_compat_ioctl(struct file *filp, unsigned int cmd, unsigned long arg)
if (!fn)
return drm_ioctl(filp, cmd, arg);
- if (drm_compat_ioctls[nr].name) {
- struct drm_file *file_priv = filp->private_data;
- DRM_DEBUG("pid=%d, dev=0x%lx, auth=%d, %s\n",
- task_pid_nr(current),
- (long)old_encode_dev(file_priv->minor->kdev->devt),
- file_priv->authenticated,
- drm_compat_ioctls[nr].name);
- ret = (*fn) (filp, cmd, arg);
- if (ret)
- DRM_DEBUG("ret = %d\n", ret);
- } else {
- ret = (*fn) (filp, cmd, arg);
- }
+ DRM_DEBUG("pid=%d, dev=0x%lx, auth=%d, %s\n",
+ task_pid_nr(current),
+ (long)old_encode_dev(file_priv->minor->kdev->devt),
+ file_priv->authenticated,
+ drm_compat_ioctls[nr].name);
+ ret = (*fn)(filp, cmd, arg);
+ if (ret)
+ DRM_DEBUG("ret = %d\n", ret);
return ret;
}
EXPORT_SYMBOL(drm_compat_ioctl);