From: Phil Sutter Date: Thu, 5 May 2011 13:29:02 +0000 (+0200) Subject: crypto: mv_cesa - refactor copy_src_to_buf() X-Git-Tag: v3.0-rc1~371^2~10 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=6677a776cf3dc4950a790946f88d26dafc4baf7b;p=pandora-kernel.git 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 Signed-off-by: Herbert Xu --- Reading git-diff-tree failed