From: Greg Rose Date: Thu, 13 Dec 2012 01:14:06 +0000 (+0000) Subject: ixgbe: Fix device ref count bug X-Git-Tag: v3.9-rc1~139^2~197^2~9 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=b4fafbe97f9548f49b9338537c25a3db451b8508;p=platform%2Fupstream%2Fkernel-adaptation-pc.git ixgbe: Fix device ref count bug The device lookup neglected to do a pci_dev_put() to decrement the device reference count. Reported-by: Elena Gurevich Signed-off-by: Greg Rose Tested-by: Phil Schmitt Tested-by: Sibai Li Signed-off-by: Jeff Kirsher --- diff --git a/drivers/net/ethernet/intel/ixgbe/ixgbe_main.c b/drivers/net/ethernet/intel/ixgbe/ixgbe_main.c index 5989b3f..1f53675 100644 --- a/drivers/net/ethernet/intel/ixgbe/ixgbe_main.c +++ b/drivers/net/ethernet/intel/ixgbe/ixgbe_main.c @@ -7758,6 +7758,8 @@ static pci_ers_result_t ixgbe_io_error_detected(struct pci_dev *pdev, if (vfdev) { e_dev_err("Issuing VFLR to VF %d\n", vf); pci_write_config_dword(vfdev, 0xA8, 0x00008000); + /* Free device reference count */ + pci_dev_put(vfdev); } pci_cleanup_aer_uncorrect_error_status(pdev);