From 514e7c3963e88bf59518e2ba852c20fe7ca68df4 Mon Sep 17 00:00:00 2001 From: phk Date: Tue, 13 Jul 1999 08:15:22 +0000 Subject: dont allow open if no device was found. --- sys/pci/xrpu.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'sys/pci/xrpu.c') 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); } -- cgit v1.1