Skip to content

Commit

Permalink
crypto: n2 - Fix a get/put_cpu() imbalance
Browse files Browse the repository at this point in the history
Fix a get/put_cpu() imbalance in the error case when qp == NULL

Signed-off-by: Thomas Meyer <thomas@m3y3r.de>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
  • Loading branch information
Thomas Meyer authored and Herbert Xu committed Aug 15, 2011
1 parent 66be895 commit e27303b
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions drivers/crypto/n2_core.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down Expand Up @@ -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;
}
Expand Down

0 comments on commit e27303b

Please sign in to comment.