diff options
| author | Bruce Evans <bde@FreeBSD.org> | 2000-06-14 16:01:57 +0000 |
|---|---|---|
| committer | Bruce Evans <bde@FreeBSD.org> | 2000-06-14 16:01:57 +0000 |
| commit | 64a5bc137e87976a06b49ad960865c6f59b05b37 (patch) | |
| tree | 38c4b1f5324169c27db8f6b0a2ee751528e8553e | |
| parent | 70d944aeaff9ebad93b0cf46d37107f1b824a237 (diff) | |
Notes
| -rw-r--r-- | sys/kern/subr_bus.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/sys/kern/subr_bus.c b/sys/kern/subr_bus.c index 54827246f48b..922297fd45ff 100644 --- a/sys/kern/subr_bus.c +++ b/sys/kern/subr_bus.c @@ -385,8 +385,7 @@ devclass_alloc_unit(devclass_t dc, int *unitp) device_t *newlist; int newsize; - newsize = (dc->maxunit ? 2 * dc->maxunit - : MINALLOCSIZE / sizeof(device_t)); + newsize = roundup((unit + 1), MINALLOCSIZE / sizeof(device_t)); newlist = malloc(sizeof(device_t) * newsize, M_DEVBUF, M_NOWAIT); if (!newlist) return ENOMEM; |
