[IPV4]: Fix issue reported by Coverity in ipv4/fib_frontend.c
authorJayachandran C <jchandra@digeo.com>
Thu, 27 Oct 2005 22:10:01 +0000 (15:10 -0700)
committerArnaldo Carvalho de Melo <acme@mandriva.com>
Sat, 29 Oct 2005 04:53:39 +0000 (02:53 -0200)
fib_del_ifaddr() dereferences ifa->ifa_dev, so the code already assumes that
ifa->ifa_dev is non-NULL, the check is unnecessary.

Signed-off-by: Jayachandran C. <c.jayachandran at gmail.com>
Signed-off-by: Arnaldo Carvalho de Melo <acme@mandriva.com>
net/ipv4/fib_frontend.c

index e61bc7177eb1b868225bf34734f85702fc311969..990633c09dfe4ccdf345d06281880117b57c7906 100644 (file)
@@ -591,7 +591,7 @@ static int fib_inetaddr_event(struct notifier_block *this, unsigned long event,
                break;
        case NETDEV_DOWN:
                fib_del_ifaddr(ifa);
-               if (ifa->ifa_dev && ifa->ifa_dev->ifa_list == NULL) {
+               if (ifa->ifa_dev->ifa_list == NULL) {
                        /* Last address was deleted from this interface.
                           Disable IP.
                         */