diff options
| author | 2021-03-25 15:31:22 -0700 | |
|---|---|---|
| committer | 2021-03-25 15:31:22 -0700 | |
| commit | efd13b71a3fa31413f8d15342e01d44b60b0a432 (patch) | |
| tree | 2ed1b299e25538c5a60485a1047507b49d3e0ecf /net/mac80211/aead_api.c | |
| parent | hinic: avoid gcc -Wrestrict warning (diff) | |
| parent | Merge branch 'akpm' (patches from Andrew) (diff) | |
| download | wireguard-linux-efd13b71a3fa31413f8d15342e01d44b60b0a432.tar.xz wireguard-linux-efd13b71a3fa31413f8d15342e01d44b60b0a432.zip | |
Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/mac80211/aead_api.c')
| -rw-r--r-- | net/mac80211/aead_api.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/net/mac80211/aead_api.c b/net/mac80211/aead_api.c index d7b3d905d535..b00d6f5b33f4 100644 --- a/net/mac80211/aead_api.c +++ b/net/mac80211/aead_api.c @@ -23,6 +23,7 @@ int aead_encrypt(struct crypto_aead *tfm, u8 *b_0, u8 *aad, size_t aad_len, struct aead_request *aead_req; int reqsize = sizeof(*aead_req) + crypto_aead_reqsize(tfm); u8 *__aad; + int ret; aead_req = kzalloc(reqsize + aad_len, GFP_ATOMIC); if (!aead_req) @@ -40,10 +41,10 @@ int aead_encrypt(struct crypto_aead *tfm, u8 *b_0, u8 *aad, size_t aad_len, aead_request_set_crypt(aead_req, sg, sg, data_len, b_0); aead_request_set_ad(aead_req, sg[0].length); - crypto_aead_encrypt(aead_req); + ret = crypto_aead_encrypt(aead_req); kfree_sensitive(aead_req); - return 0; + return ret; } int aead_decrypt(struct crypto_aead *tfm, u8 *b_0, u8 *aad, size_t aad_len, |
