Skip to content

Commit

Permalink
ipv6: remove superfluous nla_data() NULL pointer checks
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Mathias Krause authored and David S. Miller committed Mar 10, 2013
1 parent 6aed0c8 commit 22c3521
Showing 1 changed file with 0 additions and 6 deletions.
6 changes: 0 additions & 6 deletions net/ipv6/addrlabel.c
Original file line number Diff line number Diff line change
Expand Up @@ -436,10 +436,7 @@ static int ip6addrlbl_newdel(struct sk_buff *skb, struct nlmsghdr *nlh,

if (!tb[IFAL_ADDRESS])
return -EINVAL;

pfx = nla_data(tb[IFAL_ADDRESS]);
if (!pfx)
return -EINVAL;

if (!tb[IFAL_LABEL])
return -EINVAL;
Expand Down Expand Up @@ -561,10 +558,7 @@ static int ip6addrlbl_get(struct sk_buff *in_skb, struct nlmsghdr* nlh,

if (!tb[IFAL_ADDRESS])
return -EINVAL;

addr = nla_data(tb[IFAL_ADDRESS]);
if (!addr)
return -EINVAL;

rcu_read_lock();
p = __ipv6_addr_label(net, addr, ipv6_addr_type(addr), ifal->ifal_index);
Expand Down

0 comments on commit 22c3521

Please sign in to comment.