summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDave Airlie <airlied@redhat.com>2008-06-20 15:35:47 +1000
committerDave Airlie <airlied@redhat.com>2008-06-20 15:35:47 +1000
commit1915de2c56d71bbd04a7c085cbd35fbe8e33af9d (patch)
treeb945c5f88d7630cf916a8df9c996240c2884639e
parent9d79944a93e8e164e2261cdeb10cbd49ff8f314d (diff)
drm: only use kernel ioctl cmd when doing a core ioctl.
Need to overhaul the mess that is driver ioctls
-rw-r--r--linux-core/drm_drv.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/linux-core/drm_drv.c b/linux-core/drm_drv.c
index b375fa1b..6ac2adf3 100644
--- a/linux-core/drm_drv.c
+++ b/linux-core/drm_drv.c
@@ -613,9 +613,10 @@ long drm_unlocked_ioctl(struct file *filp, unsigned int cmd, unsigned long arg)
if ((nr >= DRM_COMMAND_BASE) && (nr < DRM_COMMAND_END)
&& (nr < DRM_COMMAND_BASE + dev->driver->num_ioctls))
ioctl = &dev->driver->ioctls[nr - DRM_COMMAND_BASE];
- else if ((nr >= DRM_COMMAND_END) || (nr < DRM_COMMAND_BASE))
+ else if ((nr >= DRM_COMMAND_END) || (nr < DRM_COMMAND_BASE)) {
ioctl = &drm_ioctls[nr];
- else {
+ cmd = ioctl->cmd;
+ } else {
retcode = -EINVAL;
goto err_i1;
}
@@ -631,7 +632,6 @@ long drm_unlocked_ioctl(struct file *filp, unsigned int cmd, unsigned long arg)
goto err_i1;
}
#endif
- cmd = ioctl->cmd;
func = ioctl->func;
/* is there a local override? */