]> git.baikalelectronics.ru Git - kernel.git/commit
igc: Fix NFC rules leak when driver is unloaded
authorAndre Guedes <andre.guedes@intel.com>
Fri, 24 Apr 2020 20:16:19 +0000 (13:16 -0700)
committerJeff Kirsher <jeffrey.t.kirsher@intel.com>
Sat, 23 May 2020 01:21:51 +0000 (18:21 -0700)
commitb619f444534d933130f21629ecd2e68840d85918
treeec1292920c5e48d4342d7c80a52116278bbc0936
parent3ccbd3c08929c31406dafb208eba5e847e4b5056
igc: Fix NFC rules leak when driver is unloaded

If we have RFC rules in adapter->nfc_rule_list when the IGC driver
is unloaded, all rules are leaked. This patch fixes the issue by
introducing the helper igc_flush_nfc_rules() and calling it in
igc_remove(). It also updates igc_set_features() so is reuses the
new helper instead of re-implementing it.

Signed-off-by: Andre Guedes <andre.guedes@intel.com>
Tested-by: Aaron Brown <aaron.f.brown@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
drivers/net/ethernet/intel/igc/igc_main.c