From: Thomas Meyer Date: Mon, 15 Aug 2011 07:20:19 +0000 (+0800) Subject: crypto: n2 - Fix a get/put_cpu() imbalance X-Git-Tag: firefly_0821_release~3680^2~4045^2~43 X-Git-Url: http://plrg.eecs.uci.edu/git/?a=commitdiff_plain;h=e27303b25611e9a9ba78c0b5614abeb173d6cc74;p=firefly-linux-kernel-4.4.55.git crypto: n2 - Fix a get/put_cpu() imbalance Fix a get/put_cpu() imbalance in the error case when qp == NULL Signed-off-by: Thomas Meyer Signed-off-by: Herbert Xu --- diff --git a/drivers/crypto/n2_core.c b/drivers/crypto/n2_core.c index d0183ddb3076..8944dabc0e3c 100644 --- a/drivers/crypto/n2_core.c +++ b/drivers/crypto/n2_core.c @@ -1006,9 +1006,9 @@ static int n2_do_ecb(struct ablkcipher_request *req, bool encrypt) spin_unlock_irqrestore(&qp->lock, flags); +out: put_cpu(); -out: n2_chunk_complete(req, NULL); return err; } @@ -1096,9 +1096,9 @@ static int n2_do_chaining(struct ablkcipher_request *req, bool encrypt) spin_unlock_irqrestore(&qp->lock, flags); +out: put_cpu(); -out: n2_chunk_complete(req, err ? NULL : final_iv_addr); return err; }