bdd4108c author Herbert Xu 1309160719 +0800 committer Herbert Xu 1309391046 +0800 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 ~ÖÃfš