summaryrefslogtreecommitdiffstats
path: root/sys
diff options
context:
space:
mode:
Diffstat (limited to 'sys')
-rw-r--r--sys/contrib/dev/fla/fla.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/sys/contrib/dev/fla/fla.c b/sys/contrib/dev/fla/fla.c
index baa7de0..59a1bf4 100644
--- a/sys/contrib/dev/fla/fla.c
+++ b/sys/contrib/dev/fla/fla.c
@@ -120,7 +120,7 @@ static struct fla_s {
struct devstat stats;
struct disk disk;
dev_t dev;
-} softc[NFLA];
+} softc[8];
static int
flaopen(dev_t dev, int flag, int fmt, struct proc *p)
@@ -263,6 +263,8 @@ flaprobe (device_t dev)
int i;
unit = device_get_unit(dev);
+ if (unit >= 8)
+ return (ENXIO);
sc = &softc[unit];
/* This is slightly ugly */
OpenPOWER on IntegriCloud