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 11b2955..e5f37b7 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)