Skip to content

Commit

Permalink
ipv6: Use IS_ERR_OR_NULL().
Browse files Browse the repository at this point in the history
Signed-off-by: YOSHIFUJI Hideaki <yoshfuji@linux-ipv6.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
YOSHIFUJI Hideaki / 吉藤英明 authored and David S. Miller committed Jan 22, 2013
1 parent 50c3a48 commit 3f0d2ba
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions net/ipv6/addrconf.c
Original file line number Diff line number Diff line change
Expand Up @@ -1051,7 +1051,7 @@ static int ipv6_create_tempaddr(struct inet6_ifaddr *ifp, struct inet6_ifaddr *i
ipv6_add_addr(idev, &addr, tmp_plen,
ipv6_addr_type(&addr)&IPV6_ADDR_SCOPE_MASK,
addr_flags) : NULL;
if (!ift || IS_ERR(ift)) {
if (IS_ERR_OR_NULL(ift)) {
in6_ifa_put(ifp);
in6_dev_put(idev);
pr_info("%s: retry temporary address regeneration\n", __func__);
Expand Down Expand Up @@ -2079,7 +2079,7 @@ void addrconf_prefix_rcv(struct net_device *dev, u8 *opt, int len, bool sllao)
addr_type&IPV6_ADDR_SCOPE_MASK,
addr_flags);

if (!ifp || IS_ERR(ifp)) {
if (IS_ERR_OR_NULL(ifp)) {
in6_dev_put(in6_dev);
return;
}
Expand Down

0 comments on commit 3f0d2ba

Please sign in to comment.