]> Git Repo - linux.git/commit
i40e: return immediately when failing to add fdir filter
authorJacob Keller <[email protected]>
Mon, 6 Feb 2017 22:38:41 +0000 (14:38 -0800)
committerJeff Kirsher <[email protected]>
Mon, 20 Mar 2017 23:45:20 +0000 (16:45 -0700)
commite5187ee3ee9a95b1aa32a9a3daf4f07a9f89c20c
tree6607861cacb221079be19002d472235f2a0c43ef
parent01016da1e58136518252822738fe833c662df916
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 <[email protected]>
Reviewed-by: Avinash Dayanand <[email protected]>
Reviewed-by: Alan Brady <[email protected]>
Reviewed-by: Mitch Williams <[email protected]>
Tested-by: Andrew Bowers <[email protected]>
Signed-off-by: Jeff Kirsher <[email protected]>
drivers/net/ethernet/intel/i40e/i40e_txrx.c
This page took 0.049578 seconds and 4 git commands to generate.