ipv4: fix NULL checking in devinet_ioctl()

The NULL pointer check `!ifa' should come before its first use.

[ Bug origin : commit fd23c3b31107e2fc483301ee923d8a1db14e53f4
(ipv4: Add hash table of interface addresses) in linux-2.6.39 ]

Signed-off-by: Xi Wang <xi.wang@gmail.com>
Acked-by: Eric Dumazet <edumazet@google.com>
Signed-off-by: David S. Miller <davem@davemloft.net>

authored by Xi Wang and committed by David S. Miller c7e2e1d7 ae62ca7b

+1 -1
+1 -1
net/ipv4/devinet.c
··· 823 if (!ifa) { 824 ret = -ENOBUFS; 825 ifa = inet_alloc_ifa(); 826 - INIT_HLIST_NODE(&ifa->hash); 827 if (!ifa) 828 break; 829 if (colon) 830 memcpy(ifa->ifa_label, ifr.ifr_name, IFNAMSIZ); 831 else
··· 823 if (!ifa) { 824 ret = -ENOBUFS; 825 ifa = inet_alloc_ifa(); 826 if (!ifa) 827 break; 828 + INIT_HLIST_NODE(&ifa->hash); 829 if (colon) 830 memcpy(ifa->ifa_label, ifr.ifr_name, IFNAMSIZ); 831 else