ipvlan: Add new func ipvlan_is_valid_dev instead of duplicated codes
authorGao Feng <gfree.wind@vip.163.com>
Fri, 1 Dec 2017 08:33:03 +0000 (16:33 +0800)
committerDavid S. Miller <davem@davemloft.net>
Sun, 3 Dec 2017 14:46:42 +0000 (09:46 -0500)
commit5e51fe6f4472510a85e637907e24d4fbe5e39489
tree9029011a1792dc76e1b35cd95396706082d5517c
parent0653cb2e1d1d8c1e965533ce3f167251d5e7cdd1
ipvlan: Add new func ipvlan_is_valid_dev instead of duplicated codes

There are multiple duplicated condition checks in the current codes, so
I add the new func ipvlan_is_valid_dev instead of the duplicated codes to
check if the netdev is real ipvlan dev.

Signed-off-by: Gao Feng <gfree.wind@vip.163.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ipvlan/ipvlan_main.c