Skip to content
Commit 269230e7 authored by Herbert Xu's avatar Herbert Xu
Browse files

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: default avatarJesper Juhl <jj@chaosbits.net>
Signed-off-by: default avatarHerbert Xu <herbert@gondor.apana.org.au>
parent 36ca239b
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment