summaryrefslogtreecommitdiffstats
path: root/sys/pci/xrpu.c
diff options
context:
space:
mode:
authorphk <phk@FreeBSD.org>1999-07-13 08:15:22 +0000
committerphk <phk@FreeBSD.org>1999-07-13 08:15:22 +0000
commit514e7c3963e88bf59518e2ba852c20fe7ca68df4 (patch)
tree312b4756c5daa573de10ae6d2971720ac4fbaf30 /sys/pci/xrpu.c
parentad580e436e2b46b4837508f323ead1ac95255b88 (diff)
downloadFreeBSD-src-514e7c3963e88bf59518e2ba852c20fe7ca68df4.zip
FreeBSD-src-514e7c3963e88bf59518e2ba852c20fe7ca68df4.tar.gz
dont allow open if no device was found.
Diffstat (limited to 'sys/pci/xrpu.c')
-rw-r--r--sys/pci/xrpu.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/sys/pci/xrpu.c b/sys/pci/xrpu.c
index 8bc3bca..839263c 100644
--- a/sys/pci/xrpu.c
+++ b/sys/pci/xrpu.c
@@ -6,7 +6,7 @@
* this stuff is worth it, you can buy me a beer in return. Poul-Henning Kamp
* ----------------------------------------------------------------------------
*
- * $Id: xrpu.c,v 1.13 1999/06/22 10:31:30 phk Exp $
+ * $Id: xrpu.c,v 1.14 1999/07/03 08:23:00 phk Exp $
*
* A very simple device driver for PCI cards based on Xilinx 6200 series
* FPGA/RPU devices. Current Functionality is to allow you to open and
@@ -128,6 +128,10 @@ xrpu_poll_pps(struct timecounter *tc)
static int
xrpu_open(dev_t dev, int flag, int mode, struct proc *p)
{
+ struct softc *sc = softc[dev2unit(dev)];
+
+ if (!sc)
+ return (ENXIO);
return (0);
}
OpenPOWER on IntegriCloud