summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rwxr-xr-xREADME2
-rw-r--r--pci/pci_skel.c5
2 files changed, 5 insertions, 2 deletions
diff --git a/README b/README
index b5fd3b0..085d1c6 100755
--- a/README
+++ b/README
@@ -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;