From: Herbert Xu Date: Mon, 27 Jun 2011 07:45:19 +0000 (+0800) Subject: crypto: algif_hash - Handle initial af_alg_make_sg error correctly X-Git-Tag: v3.1-rc1~266^2~10 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=269230e7c52623cda279010c8032a6f5b59caaaf;p=pandora-kernel.git crypto: algif_hash - Handle initial af_alg_make_sg error correctly When the first call to af_alg_make_sg fails, we may return garbage instead of the real error. This patch fixes it by setting the error if "copied" is zero. Based on a patch by Jesper Juhl. Reported-by: Jesper Juhl Signed-off-by: Herbert Xu --- Reading git-diff-tree failed