2
0
mirror of https://github.com/edk2-porting/linux-next.git synced 2024-12-28 07:04:00 +08:00

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 <fgao@ikuai8.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
Gao Feng 2016-12-28 16:47:42 +08:00 committed by David S. Miller
parent 8667398277
commit 3ea35d3406

View File

@ -19,9 +19,6 @@ void ipvlan_init_secret(void)
static void ipvlan_count_rx(const struct ipvl_dev *ipvlan, static void ipvlan_count_rx(const struct ipvl_dev *ipvlan,
unsigned int len, bool success, bool mcast) unsigned int len, bool success, bool mcast)
{ {
if (!ipvlan)
return;
if (likely(success)) { if (likely(success)) {
struct ipvl_pcpu_stats *pcptr; struct ipvl_pcpu_stats *pcptr;