diff options
author | Jason A. Donenfeld <Jason@zx2c4.com> | 2016-11-15 20:19:20 +0100 |
---|---|---|
committer | Jason A. Donenfeld <Jason@zx2c4.com> | 2016-11-15 20:19:20 +0100 |
commit | 6e71b31d5116a9260be12e855672196bcec618cb (patch) | |
tree | 07f4c09df2f716ea45f3ac4de67674158bf39f61 /src/data.c | |
parent | d60ef8063c80b899b57fa1450ba48eb9d42a620f (diff) |
various: nits from willy
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
Diffstat (limited to 'src/data.c')
-rw-r--r-- | src/data.c | 6 |
1 files changed, 2 insertions, 4 deletions
@@ -439,11 +439,9 @@ void packet_consume_data(struct sk_buff *skb, size_t offset, struct wireguard_de ret = -EINVAL; rcu_read_lock(); keypair = noise_keypair_get((struct noise_keypair *)index_hashtable_lookup(&wg->index_hashtable, INDEX_HASHTABLE_KEYPAIR, idx)); - if (unlikely(!keypair)) { - rcu_read_unlock(); - goto err; - } rcu_read_unlock(); + if (unlikely(!keypair)) + goto err; #ifdef CONFIG_WIREGUARD_PARALLEL if (cpumask_weight(cpu_online_mask) > 1) { unsigned int cpu = choose_cpu(idx); |