[IPV4]: Fix rtm_to_ifaddr() error handling.

Return negative error value (embedded in the pointer) instead of
returning NULL.

Signed-off-by: Evgeniy Polyakov <johnpol@2ka.mipt.ru>
Signed-off-by: David S. Miller <davem@davemloft.net>

authored by Evgeniy Polyakov and committed by David S. Miller c4e38f41 30fbc9f7

+3 -1
+3 -1
net/ipv4/devinet.c
··· 502 502 goto errout; 503 503 504 504 ifm = nlmsg_data(nlh); 505 - if (ifm->ifa_prefixlen > 32 || tb[IFA_LOCAL] == NULL) 505 + if (ifm->ifa_prefixlen > 32 || tb[IFA_LOCAL] == NULL) { 506 + err = -EINVAL; 506 507 goto errout; 508 + } 507 509 508 510 dev = __dev_get_by_index(ifm->ifa_index); 509 511 if (dev == NULL) {