diff --git a/net/core/iovec.c b/net/core/iovec.c index 4db6bfa04fbec6..d1628b79286b68 100644 --- a/net/core/iovec.c +++ b/net/core/iovec.c @@ -157,6 +157,10 @@ EXPORT_SYMBOL(memcpy_fromiovec); int memcpy_fromiovecend(unsigned char *kdata, const struct iovec *iov, int offset, int len) { + /* No data? Done! */ + if (len == 0) + return 0; + /* Skip over the finished iovecs */ while (offset >= iov->iov_len) { offset -= iov->iov_len;