diff options
Diffstat (limited to 'net/ipv6/anycast.c')
-rw-r--r-- | net/ipv6/anycast.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/net/ipv6/anycast.c b/net/ipv6/anycast.c index 9e6b0ee563f0..514ac259f543 100644 --- a/net/ipv6/anycast.c +++ b/net/ipv6/anycast.c | |||
@@ -70,7 +70,7 @@ int ipv6_sock_ac_join(struct sock *sk, int ifindex, const struct in6_addr *addr) | |||
70 | return -EINVAL; | 70 | return -EINVAL; |
71 | 71 | ||
72 | pac = sock_kmalloc(sk, sizeof(struct ipv6_ac_socklist), GFP_KERNEL); | 72 | pac = sock_kmalloc(sk, sizeof(struct ipv6_ac_socklist), GFP_KERNEL); |
73 | if (pac == NULL) | 73 | if (!pac) |
74 | return -ENOMEM; | 74 | return -ENOMEM; |
75 | pac->acl_next = NULL; | 75 | pac->acl_next = NULL; |
76 | pac->acl_addr = *addr; | 76 | pac->acl_addr = *addr; |
@@ -93,7 +93,7 @@ int ipv6_sock_ac_join(struct sock *sk, int ifindex, const struct in6_addr *addr) | |||
93 | } else | 93 | } else |
94 | dev = __dev_get_by_index(net, ifindex); | 94 | dev = __dev_get_by_index(net, ifindex); |
95 | 95 | ||
96 | if (dev == NULL) { | 96 | if (!dev) { |
97 | err = -ENODEV; | 97 | err = -ENODEV; |
98 | goto error; | 98 | goto error; |
99 | } | 99 | } |
@@ -222,7 +222,7 @@ static struct ifacaddr6 *aca_alloc(struct rt6_info *rt, | |||
222 | struct ifacaddr6 *aca; | 222 | struct ifacaddr6 *aca; |
223 | 223 | ||
224 | aca = kzalloc(sizeof(*aca), GFP_ATOMIC); | 224 | aca = kzalloc(sizeof(*aca), GFP_ATOMIC); |
225 | if (aca == NULL) | 225 | if (!aca) |
226 | return NULL; | 226 | return NULL; |
227 | 227 | ||
228 | aca->aca_addr = *addr; | 228 | aca->aca_addr = *addr; |
@@ -268,7 +268,7 @@ int __ipv6_dev_ac_inc(struct inet6_dev *idev, const struct in6_addr *addr) | |||
268 | goto out; | 268 | goto out; |
269 | } | 269 | } |
270 | aca = aca_alloc(rt, addr); | 270 | aca = aca_alloc(rt, addr); |
271 | if (aca == NULL) { | 271 | if (!aca) { |
272 | ip6_rt_put(rt); | 272 | ip6_rt_put(rt); |
273 | err = -ENOMEM; | 273 | err = -ENOMEM; |
274 | goto out; | 274 | goto out; |
@@ -337,7 +337,7 @@ static int ipv6_dev_ac_dec(struct net_device *dev, const struct in6_addr *addr) | |||
337 | { | 337 | { |
338 | struct inet6_dev *idev = __in6_dev_get(dev); | 338 | struct inet6_dev *idev = __in6_dev_get(dev); |
339 | 339 | ||
340 | if (idev == NULL) | 340 | if (!idev) |
341 | return -ENODEV; | 341 | return -ENODEV; |
342 | return __ipv6_dev_ac_dec(idev, addr); | 342 | return __ipv6_dev_ac_dec(idev, addr); |
343 | } | 343 | } |