(unsigned long) count, (long long) pos);
 
        if (nr_segs != 1)
-               return -EINVAL;
-
-       if (count < 0)
                goto out;
+
        retval = -EFAULT;
        if (!access_ok(VERIFY_WRITE, buf, count))
                goto out;
 ssize_t nfs_file_direct_write(struct kiocb *iocb, const struct iovec *iov,
                                unsigned long nr_segs, loff_t pos)
 {
-       ssize_t retval;
+       ssize_t retval = -EINVAL;
        struct file *file = iocb->ki_filp;
        struct address_space *mapping = file->f_mapping;
        /* XXX: temporary */
                (unsigned long) count, (long long) pos);
 
        if (nr_segs != 1)
-               return -EINVAL;
+               goto out;
 
        retval = generic_write_checks(file, &pos, &count, 0);
        if (retval)