|
@@ -481,7 +481,7 @@ int drm_ioctl(struct inode *inode, struct file *filp,
|
|
}
|
|
}
|
|
retcode = func(dev, kdata, file_priv);
|
|
retcode = func(dev, kdata, file_priv);
|
|
|
|
|
|
- if ((retcode == 0) && (cmd & IOC_OUT)) {
|
|
|
|
|
|
+ if (cmd & IOC_OUT) {
|
|
if (copy_to_user((void __user *)arg, kdata,
|
|
if (copy_to_user((void __user *)arg, kdata,
|
|
_IOC_SIZE(cmd)) != 0)
|
|
_IOC_SIZE(cmd)) != 0)
|
|
retcode = -EFAULT;
|
|
retcode = -EFAULT;
|