diff options
-rwxr-xr-x | README | 2 | ||||
-rw-r--r-- | pci/pci_skel.c | 5 |
2 files changed, 5 insertions, 2 deletions
@@ -25,4 +25,4 @@ $ export KERNELDIR=/path/to/linux $ cd ldd3 $ make -Bugs, comments or patches: martinez.javier@gmail.com
\ No newline at end of file +Bugs, comments or patches: martinez.javier@gmail.com 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; |