From: Joshua I. James Date: Fri, 5 Dec 2014 05:24:44 +0000 (+0900) Subject: crypto: aead - fixed style error in aead.c X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=4fad478ae0ff7bd27c853a085555317c0dc68704;p=GitHub%2FLineageOS%2FG12%2Fandroid_kernel_amlogic_linux-4.9.git crypto: aead - fixed style error in aead.c Fixed style error identified by checkpatch. ERROR: do not use assignment in if condition + if ((err = crypto_register_instance(tmpl, inst))) { Signed-off-by: Joshua I. James Signed-off-by: Herbert Xu --- diff --git a/crypto/aead.c b/crypto/aead.c index 547491e35c63..222271070b49 100644 --- a/crypto/aead.c +++ b/crypto/aead.c @@ -448,7 +448,8 @@ static int crypto_nivaead_default(struct crypto_alg *alg, u32 type, u32 mask) if (IS_ERR(inst)) goto put_tmpl; - if ((err = crypto_register_instance(tmpl, inst))) { + err = crypto_register_instance(tmpl, inst); + if (err) { tmpl->free(inst); goto put_tmpl; }