diff options
author | Mathias Krause <minipli@googlemail.com> | 2013-03-09 00:57:00 -0500 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2013-03-10 16:46:09 -0400 |
commit | 22c352195ee09dcce9f4f0e2d4cd5f382b90f0fb (patch) | |
tree | c061babed893a4d968b871b2c31d0c0f1434598e /net | |
parent | 6aed0c8bf7d2f389b472834053eb6e3bd6926999 (diff) |
ipv6: remove superfluous nla_data() NULL pointer checks
nla_data() cannot return NULL, so these NULL pointer checks are
superfluous.
Signed-off-by: Mathias Krause <minipli@googlemail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net')
-rw-r--r-- | net/ipv6/addrlabel.c | 6 |
1 files changed, 0 insertions, 6 deletions
diff --git a/net/ipv6/addrlabel.c b/net/ipv6/addrlabel.c index aad64352cb60..6f226c850c91 100644 --- a/net/ipv6/addrlabel.c +++ b/net/ipv6/addrlabel.c | |||
@@ -436,10 +436,7 @@ static int ip6addrlbl_newdel(struct sk_buff *skb, struct nlmsghdr *nlh, | |||
436 | 436 | ||
437 | if (!tb[IFAL_ADDRESS]) | 437 | if (!tb[IFAL_ADDRESS]) |
438 | return -EINVAL; | 438 | return -EINVAL; |
439 | |||
440 | pfx = nla_data(tb[IFAL_ADDRESS]); | 439 | pfx = nla_data(tb[IFAL_ADDRESS]); |
441 | if (!pfx) | ||
442 | return -EINVAL; | ||
443 | 440 | ||
444 | if (!tb[IFAL_LABEL]) | 441 | if (!tb[IFAL_LABEL]) |
445 | return -EINVAL; | 442 | return -EINVAL; |
@@ -561,10 +558,7 @@ static int ip6addrlbl_get(struct sk_buff *in_skb, struct nlmsghdr* nlh, | |||
561 | 558 | ||
562 | if (!tb[IFAL_ADDRESS]) | 559 | if (!tb[IFAL_ADDRESS]) |
563 | return -EINVAL; | 560 | return -EINVAL; |
564 | |||
565 | addr = nla_data(tb[IFAL_ADDRESS]); | 561 | addr = nla_data(tb[IFAL_ADDRESS]); |
566 | if (!addr) | ||
567 | return -EINVAL; | ||
568 | 562 | ||
569 | rcu_read_lock(); | 563 | rcu_read_lock(); |
570 | p = __ipv6_addr_label(net, addr, ipv6_addr_type(addr), ifal->ifal_index); | 564 | p = __ipv6_addr_label(net, addr, ipv6_addr_type(addr), ifal->ifal_index); |