diff options
Diffstat (limited to 'lib/mpi/mpicoder.c')
-rw-r--r-- | lib/mpi/mpicoder.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/lib/mpi/mpicoder.c b/lib/mpi/mpicoder.c index c20ef27ad876..c7e0a705eecf 100644 --- a/lib/mpi/mpicoder.c +++ b/lib/mpi/mpicoder.c | |||
@@ -446,8 +446,11 @@ MPI mpi_read_raw_from_sgl(struct scatterlist *sgl, unsigned int len) | |||
446 | const u8 *buff = sg_virt(sg); | 446 | const u8 *buff = sg_virt(sg); |
447 | int len = sg->length; | 447 | int len = sg->length; |
448 | 448 | ||
449 | while (len-- && !*buff++) | 449 | while (len && !*buff) { |
450 | lzeros++; | 450 | lzeros++; |
451 | len--; | ||
452 | buff++; | ||
453 | } | ||
451 | 454 | ||
452 | if (len && *buff) | 455 | if (len && *buff) |
453 | break; | 456 | break; |