]> git.baikalelectronics.ru Git - kernel.git/commit
crypto: mv_cesa - refactor copy_src_to_buf()
authorPhil Sutter <phil.sutter@viprinet.com>
Thu, 5 May 2011 13:29:02 +0000 (15:29 +0200)
committerHerbert Xu <herbert@gondor.apana.org.au>
Wed, 11 May 2011 05:06:18 +0000 (15:06 +1000)
commitcb3c39b27f11cf9ed88546fcd912b99a25c8ba45
tree7554959e21ad98344c8e150f71c3aade49fca233
parent531493cafbe522c9d927db9f992d4169e7f356d2
crypto: mv_cesa - refactor copy_src_to_buf()

The main goal was to have it not do anything when a zero len parameter
was being passed (which could lead to a null pointer dereference, as in
this case p->src_sg is null, either). Using the min() macro, the lower
part of the loop gets simpler, too.

Signed-off-by: Phil Sutter <phil.sutter@viprinet.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
drivers/crypto/mv_cesa.c