diff options
Diffstat (limited to 'lib/mpi/mpicoder.c')
-rw-r--r-- | lib/mpi/mpicoder.c | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/lib/mpi/mpicoder.c b/lib/mpi/mpicoder.c index 048f0aa505ce..4ba0f2361d3c 100644 --- a/lib/mpi/mpicoder.c +++ b/lib/mpi/mpicoder.c | |||
@@ -447,16 +447,12 @@ MPI mpi_read_raw_from_sgl(struct scatterlist *sgl, unsigned int nbytes) | |||
447 | break; | 447 | break; |
448 | 448 | ||
449 | ents--; | 449 | ents--; |
450 | nbytes -= lzeros; | ||
450 | lzeros = 0; | 451 | lzeros = 0; |
451 | } | 452 | } |
452 | 453 | ||
453 | sgl = sg; | 454 | sgl = sg; |
454 | 455 | nbytes -= lzeros; | |
455 | if (!ents) | ||
456 | nbytes = 0; | ||
457 | else | ||
458 | nbytes -= lzeros; | ||
459 | |||
460 | nbits = nbytes * 8; | 456 | nbits = nbytes * 8; |
461 | if (nbits > MAX_EXTERN_MPI_BITS) { | 457 | if (nbits > MAX_EXTERN_MPI_BITS) { |
462 | pr_info("MPI: mpi too large (%u bits)\n", nbits); | 458 | pr_info("MPI: mpi too large (%u bits)\n", nbits); |