diff --git a/net/mac80211/fils_aead.c b/net/mac80211/fils_aead.c index b81b4f2472cf..ecfdd97758a3 100644 --- a/net/mac80211/fils_aead.c +++ b/net/mac80211/fils_aead.c @@ -110,10 +110,8 @@ static int aes_siv_encrypt(const u8 *key, size_t key_len, * overwriting this during AES-CTR. */ tmp = kmemdup(plain, plain_len, GFP_KERNEL); - if (!tmp) { - res = -ENOMEM; - goto fail; - } + if (!tmp) + return -ENOMEM; /* IV for CTR before encrypted data */ memcpy(out, v, AES_BLOCK_SIZE);