Skip to content
Commit ca94e937 authored by Eric Biggers's avatar Eric Biggers Committed by Herbert Xu
Browse files

crypto: algapi - make crypto_grab_spawn() handle an ERR_PTR() name



To allow further simplifying template ->create() functions, make
crypto_grab_spawn() handle an ERR_PTR() name by passing back the error.

For most templates, this will allow the result of crypto_attr_alg_name()
to be passed directly to crypto_grab_*(), rather than first having to
assign it to a variable [where it can then potentially be misused, as it
was in the rfc7539 template prior to commit 5e27f38f ("crypto:
chacha20poly1305 - set cra_name correctly")] and check it for error.

Signed-off-by: default avatarEric Biggers <ebiggers@google.com>
Signed-off-by: default avatarHerbert Xu <herbert@gondor.apana.org.au>
parent ff670627
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment