]> www.infradead.org Git - users/jedix/linux-maple.git/commit
i40e: return immediately when failing to add fdir filter
authorJacob Keller <jacob.e.keller@intel.com>
Mon, 6 Feb 2017 22:38:41 +0000 (14:38 -0800)
committerJack Vogel <jack.vogel@oracle.com>
Sat, 10 Jun 2017 01:57:03 +0000 (18:57 -0700)
commit387ac2f23518aa6b14370219ac9aab48f95b733f
tree8df5e612a3fb9120d55b60bff3d60be04bcf25d6
parenta4edc9c8f68c66734f248a532b276e2cc7de1b09
i40e: return immediately when failing to add fdir filter

Instead of setting err=true and checking this to determine when to free
the raw_packet near the end of the function, simply kfree and return
immediately. The resulting code is a bit cleaner and has one less
variable. This also resolves a subtle bug in the ipv4 case which could
fail to add the first filter and then never free the memory, resulting
in a small memory leak.

Change-ID: I7583aac033481dc794b4acaa14445059c8930ff1
Signed-off-by: Jacob Keller <jacob.e.keller@intel.com>
Reviewed-by: Avinash Dayanand <avinash.dayanand@intel.com>
Reviewed-by: Alan Brady <alan.brady@intel.com>
Reviewed-by: Mitch Williams <mitch.a.williams@intel.com>
Tested-by: Andrew Bowers <andrewx.bowers@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Orabug: 26132523
(cherry picked from commit e5187ee3ee9a95b1aa32a9a3daf4f07a9f89c20c)
Signed-off-by: Jack Vogel <jack.vogel@oracle.com>
Reviewed-by: Brian Maly <brian.maly@oracle.com>
drivers/net/ethernet/intel/i40e/i40e_txrx.c