diff options
author | Alan Hourihane <alanh@fairlite.demon.co.uk> | 2007-09-26 15:38:54 +0100 |
---|---|---|
committer | Alan Hourihane <alanh@fairlite.demon.co.uk> | 2007-09-26 15:38:54 +0100 |
commit | 6671ad1917698b6174a1af314b63b3800d75248c (patch) | |
tree | 9a9a333f364aa0f758fcbdb62ccebe22a788138c /linux-core | |
parent | 03c47f1420bf17a1e0f2b86be500656ae5a4c95b (diff) |
don't copy back if an error was returned.
Diffstat (limited to 'linux-core')
-rw-r--r-- | linux-core/drm_drv.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/linux-core/drm_drv.c b/linux-core/drm_drv.c index cedb6d50..8513a28f 100644 --- a/linux-core/drm_drv.c +++ b/linux-core/drm_drv.c @@ -645,7 +645,7 @@ long drm_unlocked_ioctl(struct file *filp, unsigned int cmd, unsigned long arg) retcode = func(dev, kdata, file_priv); } - if (cmd & IOC_OUT) { + if ((retcode == 0) && cmd & IOC_OUT) { if (copy_to_user((void __user *)arg, kdata, _IOC_SIZE(cmd)) != 0) retcode = -EACCES; |