|
@@ -542,7 +542,7 @@ static long iowarrior_ioctl(struct file *file, unsigned int cmd,
|
|
|
retval = io_res;
|
|
|
else {
|
|
|
io_res = copy_to_user(user_buffer, buffer, dev->report_size);
|
|
|
- if (io_res < 0)
|
|
|
+ if (io_res)
|
|
|
retval = -EFAULT;
|
|
|
}
|
|
|
break;
|
|
@@ -574,7 +574,7 @@ static long iowarrior_ioctl(struct file *file, unsigned int cmd,
|
|
|
}
|
|
|
io_res = copy_to_user((struct iowarrior_info __user *)arg, &info,
|
|
|
sizeof(struct iowarrior_info));
|
|
|
- if (io_res < 0)
|
|
|
+ if (io_res)
|
|
|
retval = -EFAULT;
|
|
|
break;
|
|
|
}
|