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
2010-02-16 20:24:07 +08:00
2011-03-31 11:26:23 -03:00
2010-02-16 20:26:46 +08: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-02-16 20:29:45 +08:00
2010-05-26 10:36:51 +10:00
2008-06-02 15:46:51 +10:00
2010-02-16 20:33:49 +08:00
2010-12-02 14:47:16 +08:00
2008-08-29 15:50:02 +10: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
2008-04-21 10:19:34 +08:00
2009-02-17 20:00:11 +08:00
2008-04-21 10:19:34 +08:00
2008-12-25 11:02:16 +11:00
2010-03-02 21:58:16 +08:00
2007-10-10 16:55:38 -07:00
2008-04-21 10:19:34 +08:00
2008-04-21 10:19:34 +08:00
2008-12-25 11:02:21 +11:00
2011-03-31 11:26:23 -03:00
2008-12-25 11:02:22 +11:00
2011-03-31 11:26:23 -03:00