llseek: automatically add .llseek fop
[sfrench/cifs-2.6.git] / drivers / usb / misc / iowarrior.c
index 2de49c8887c5f772b0f166cc7b98354f4ad902ea..9b50db2570194404313c2b894227cc0dd3dba4c8 100644 (file)
@@ -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;
                }
@@ -730,6 +730,7 @@ static const struct file_operations iowarrior_fops = {
        .open = iowarrior_open,
        .release = iowarrior_release,
        .poll = iowarrior_poll,
+       .llseek = noop_llseek,
 };
 
 static char *iowarrior_devnode(struct device *dev, mode_t *mode)