fm10k: print error code when pci_enable_device_mem fails during probe
authorJacob Keller <jacob.e.keller@intel.com>
Thu, 23 Jun 2016 20:31:00 +0000 (13:31 -0700)
committerJeff Kirsher <jeffrey.t.kirsher@intel.com>
Mon, 29 Aug 2016 08:31:03 +0000 (01:31 -0700)
Signed-off-by: Jacob Keller <jacob.e.keller@intel.com>
Tested-by: Krishneil Singh <Krishneil.k.singh@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
drivers/net/ethernet/intel/fm10k/fm10k_pci.c

index 11b29552f6646a3a98945935c5c7110ec507428f..e5f37b78819688c2ab7a232985262fb5a84211fb 100644 (file)
@@ -1951,8 +1951,11 @@ static int fm10k_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
        int err;
 
        err = pci_enable_device_mem(pdev);
-       if (err)
+       if (err) {
+               dev_err(&pdev->dev,
+                       "PCI enable device failed: %d\n", err);
                return err;
+       }
 
        err = dma_set_mask_and_coherent(&pdev->dev, DMA_BIT_MASK(48));
        if (err)