diff options
author | Ingo Molnar <mingo@kernel.org> | 2014-11-12 09:09:01 -0500 |
---|---|---|
committer | Ingo Molnar <mingo@kernel.org> | 2014-11-12 09:09:01 -0500 |
commit | 890ca861f868a10617029ffc87eae7d48ea6876c (patch) | |
tree | 713383f4e3bbd94ddb9816a25e6b3911511908f1 /lib/iovec.c | |
parent | 03452d27c6cd9cebb59a6bb0fb6bd8557916c263 (diff) | |
parent | 206c5f60a3d902bc4b56dab2de3e88de5eb06108 (diff) |
Merge tag 'v3.18-rc4' into x86/cleanups, to refresh the tree before pulling new changes.
Signed-off-by: Ingo Molnar <mingo@kernel.org>
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); | |||
85 | int memcpy_fromiovecend(unsigned char *kdata, const struct iovec *iov, | 85 | int memcpy_fromiovecend(unsigned char *kdata, const struct iovec *iov, |
86 | int offset, int len) | 86 | int offset, int len) |
87 | { | 87 | { |
88 | /* No data? Done! */ | ||
89 | if (len == 0) | ||
90 | return 0; | ||
91 | |||
88 | /* Skip over the finished iovecs */ | 92 | /* Skip over the finished iovecs */ |
89 | while (offset >= iov->iov_len) { | 93 | while (offset >= iov->iov_len) { |
90 | offset -= iov->iov_len; | 94 | offset -= iov->iov_len; |