summaryrefslogtreecommitdiff
path: root/drivers/net/wireguard/socket.c
diff options
context:
space:
mode:
authorAntonio Quartulli <a@unstable.cc>2020-12-10 09:55:05 +0100
committerMichael Bestas <mkbestas@lineageos.org>2021-07-23 02:43:40 +0300
commitf9f6d22b370b365ec5a832c1222f8e2a933197ac (patch)
tree75861bb02396007c1d2fdb3a6eb4fc9ccd20fa8b /drivers/net/wireguard/socket.c
parentc8ba73d75cbf6e60520258ecea19aa8afc622a02 (diff)
global: avoid double unlikely() notation when using IS_ERR()
The definition of IS_ERR() already applies the unlikely() notation when checking the error status of the passed pointer. For this reason there is no need to have the same notation outside of IS_ERR() itself. Clean up code by removing redundant notation. Signed-off-by: Antonio Quartulli <a@unstable.cc> Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com> Change-Id: I7d6bb773908583c55db620a9c5263eb72476bf00
Diffstat (limited to 'drivers/net/wireguard/socket.c')
-rw-r--r--drivers/net/wireguard/socket.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/net/wireguard/socket.c b/drivers/net/wireguard/socket.c
index c33e2c81635f..e9c35130846c 100644
--- a/drivers/net/wireguard/socket.c
+++ b/drivers/net/wireguard/socket.c
@@ -71,7 +71,7 @@ static int send4(struct wg_device *wg, struct sk_buff *skb,
ip_rt_put(rt);
rt = ip_route_output_flow(sock_net(sock), &fl, sock);
}
- if (unlikely(IS_ERR(rt))) {
+ if (IS_ERR(rt)) {
ret = PTR_ERR(rt);
net_dbg_ratelimited("%s: No route to %pISpfsc, error %d\n",
wg->dev->name, &endpoint->addr, ret);
@@ -138,7 +138,7 @@ static int send6(struct wg_device *wg, struct sk_buff *skb,
}
dst = ipv6_stub->ipv6_dst_lookup_flow(sock_net(sock), sock, &fl,
NULL);
- if (unlikely(IS_ERR(dst))) {
+ if (IS_ERR(dst)) {
ret = PTR_ERR(dst);
net_dbg_ratelimited("%s: No route to %pISpfsc, error %d\n",
wg->dev->name, &endpoint->addr, ret);