From: Gao Feng Date: Wed, 28 Dec 2016 08:47:42 +0000 (+0800) Subject: driver: ipvlan: Remove unnecessary ipvlan NULL check in ipvlan_count_rx X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=3ea35d3406d31a7389c2a299e28168c52040843a;p=GitHub%2Fmoto-9609%2Fandroid_kernel_motorola_exynos9610.git driver: ipvlan: Remove unnecessary ipvlan NULL check in ipvlan_count_rx There are three functions which would invoke the ipvlan_count_rx. They are ipvlan_process_multicast, ipvlan_rcv_frame, and ipvlan_nf_input. The former two functions already use the ipvlan directly before ipvlan_count_rx, and ipvlan_nf_input gets the ipvlan from ipvl_addr->master, it is not possible to be NULL too. So the ipvlan pointer check is unnecessary in ipvlan_count_rx. Signed-off-by: Gao Feng Signed-off-by: David S. Miller --- diff --git a/drivers/net/ipvlan/ipvlan_core.c b/drivers/net/ipvlan/ipvlan_core.c index 83ce74acf82d..8ae335d73d38 100644 --- a/drivers/net/ipvlan/ipvlan_core.c +++ b/drivers/net/ipvlan/ipvlan_core.c @@ -19,9 +19,6 @@ void ipvlan_init_secret(void) static void ipvlan_count_rx(const struct ipvl_dev *ipvlan, unsigned int len, bool success, bool mcast) { - if (!ipvlan) - return; - if (likely(success)) { struct ipvl_pcpu_stats *pcptr;