diff options
| author | James Morris <[email protected]> | 2014-11-19 10:32:12 +0000 |
|---|---|---|
| committer | James Morris <[email protected]> | 2014-11-19 10:32:12 +0000 |
| commit | b10778a00d40b3d9fdaaf5891e802794781ff71c (patch) | |
| tree | 6ba4cbac86eecedc3f30650e7f764ecf00c83898 /lib/iovec.c | |
| parent | integrity: do zero padding of the key id (diff) | |
| parent | Linux 3.17 (diff) | |
| download | kernel-b10778a00d40b3d9fdaaf5891e802794781ff71c.tar.gz kernel-b10778a00d40b3d9fdaaf5891e802794781ff71c.zip | |
Merge commit 'v3.17' into next
Diffstat (limited to 'lib/iovec.c')
| -rw-r--r-- | lib/iovec.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/lib/iovec.c b/lib/iovec.c index 7a7c2da4cddf..df3abd1eaa4a 100644 --- a/lib/iovec.c +++ b/lib/iovec.c @@ -85,6 +85,10 @@ EXPORT_SYMBOL(memcpy_toiovecend); 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; |
