crypto: tcrypt - fix buflen reminder calculation
authorCristian Stoica <cristian.stoica@freescale.com>
Tue, 27 Jan 2015 09:54:27 +0000 (11:54 +0200)
committerHerbert Xu <herbert@gondor.apana.org.au>
Wed, 4 Feb 2015 09:59:41 +0000 (20:59 +1100)
- This fixes the intent of the code to limit the last scatterlist to
  either a full PAGE or a fraction of it, depending on the number of
  pages needed by buflen and the available space advertised by XBUFLEN.

  The original code always sets the last scatterlist to a fraction of a
  PAGE because the first 'if' is never executed.

- Rearrange the second part of the code to remove the conditional from
  the loop

Signed-off-by: Cristian Stoica <cristian.stoica@freescale.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
crypto/tcrypt.c

diff --cc crypto/tcrypt.c
Simple merge