summaryrefslogtreecommitdiffstats
path: root/pci/pci_skel.c
diff options
context:
space:
mode:
Diffstat (limited to 'pci/pci_skel.c')
-rw-r--r--pci/pci_skel.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/pci/pci_skel.c b/pci/pci_skel.c
index 700b9cb..3ac021d 100644
--- a/pci/pci_skel.c
+++ b/pci/pci_skel.c
@@ -23,7 +23,10 @@ static int probe(struct pci_dev *dev, const struct pci_device_id *id)
/* Do probing type stuff here.
* Like calling request_region();
*/
- pci_enable_device(dev);
+ if(pci_enable_device(dev)) {
+ dev_err(&dev->dev, "can't enable PCI device\n");
+ return -ENODEV;
+ }
if (skel_get_revision(dev) == 0x42)
return -ENODEV;