]> git.baikalelectronics.ru Git - kernel.git/commit
ixgbe: fix crash on rmmod after probe fail
authorEmil Tantilov <emil.s.tantilov@intel.com>
Thu, 4 Dec 2014 03:03:38 +0000 (03:03 +0000)
committerJeff Kirsher <jeffrey.t.kirsher@intel.com>
Fri, 5 Dec 2014 17:13:08 +0000 (09:13 -0800)
commit156539857d4b9122d073f1420d62ab51ef9e88ac
treef3e0e75d706cca8f6caf9eee77f8a33c60dd625c
parent405cf2193ec66094f017c8f4b141f3bac0fdebcd
ixgbe: fix crash on rmmod after probe fail

The driver has logic to free up used data in case any of the checks in
ixgbe_probe() fail, however there is a similar set of cleanups that can
occur on driver unload in ixgbe_remove() which can cause the rmmod command
to crash.

This patch aims to fix the logic by moving pci_set_drvdata() after all error
checks and then adds a check in ixgbe_remove() to skip it altogether if
adapter comes up empty.

Signed-off-by: Emil Tantilov <emil.s.tantilov@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
drivers/net/ethernet/intel/ixgbe/ixgbe_main.c