diff --git a/net/core/iovec.c b/net/core/iovec.c index 1117a26a8548..7fc51422d73c 100644 --- a/net/core/iovec.c +++ b/net/core/iovec.c @@ -147,6 +147,10 @@ int csum_partial_copy_fromiovecend(unsigned char *kdata, struct iovec *iov, __wsum csum = *csump; int partial_cnt = 0, err = 0; + /* No data? Done! */ + if (len == 0) + return 0; + /* Skip over the finished iovecs */ while (offset >= iov->iov_len) { offset -= iov->iov_len;