netdev: remove potentially harmful checks
authorVeaceslav Falico <vfalico@redhat.com>
Mon, 7 Apr 2014 09:25:12 +0000 (11:25 +0200)
committerDavid S. Miller <davem@davemloft.net>
Mon, 7 Apr 2014 19:52:07 +0000 (15:52 -0400)
commit6859e7df6d9045a461412777e63bd8cef12f9705
tree11e60459c57aa042d1d656ce3418614ca9de8863
parent6f25cd47dcd2b9912c6e52aa833ba1614f7b5086
netdev: remove potentially harmful checks

Currently we're checking a variable for != NULL after actually
dereferencing it, in netdev_lower_get_next_private*().

It's counter-intuitive at best, and can lead to faulty usage (as it implies
that the variable can be NULL), so fix it by removing the useless checks.

Reported-by: Daniel Borkmann <dborkman@redhat.com>
CC: "David S. Miller" <davem@davemloft.net>
CC: Eric Dumazet <edumazet@google.com>
CC: Nicolas Dichtel <nicolas.dichtel@6wind.com>
CC: Jiri Pirko <jiri@resnulli.us>
CC: stephen hemminger <stephen@networkplumber.org>
CC: Jerry Chu <hkchu@google.com>
Signed-off-by: Veaceslav Falico <vfalico@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/core/dev.c