• Eric Biggers's avatar
    crypto: algapi - make crypto_drop_spawn() a no-op on uninitialized spawns · ff670627
    Eric Biggers authored
    Make crypto_drop_spawn() do nothing when the spawn hasn't been
    initialized with an algorithm yet.  This will allow simplifying error
    handling in all the template ->create() functions, since on error they
    will be able to just call their usual "free instance" function, rather
    than having to handle dropping just the spawns that have been
    initialized so far.
    
    This does assume the spawn starts out zero-filled, but that's always the
    case since instances are allocated with kzalloc().  And some other code
    already assumes this anyway.
    Signed-off-by: default avatarEric Biggers <ebiggers@google.com>
    Signed-off-by: default avatarHerbert Xu <herbert@gondor.apana.org.au>
    ff670627
algapi.c 29.7 KB