Herbert Xu 269230e7c5 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 <jj@chaosbits.net>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
2011-06-30 07:44:06 +08:00
..
2011-03-31 11:26:23 -03:00
2011-03-31 11:26:23 -03:00
2010-12-02 14:47:16 +08:00
2010-10-26 16:52:08 -07:00
2010-11-13 21:47:55 +09:00
2010-12-02 14:47:16 +08:00
2010-12-02 14:47:16 +08:00
2011-03-31 11:26:23 -03:00
2011-06-30 07:44:01 +08:00
2011-03-31 11:26:23 -03:00
2011-03-31 11:26:23 -03:00