diff options
Diffstat (limited to 'sys/kern/subr_bus.c')
-rw-r--r-- | sys/kern/subr_bus.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/sys/kern/subr_bus.c b/sys/kern/subr_bus.c index 5610f38..44dcd47 100644 --- a/sys/kern/subr_bus.c +++ b/sys/kern/subr_bus.c @@ -3355,15 +3355,17 @@ bus_alloc_resources(device_t dev, struct resource_spec *rs, } void -bus_release_resources(device_t dev, struct resource_spec *rs, +bus_release_resources(device_t dev, const struct resource_spec *rs, struct resource **res) { int i; for (i = 0; rs[i].type != -1; i++) - if (res[i] != NULL) + if (res[i] != NULL) { bus_release_resource( dev, rs[i].type, rs[i].rid, res[i]); + res[i] = NULL; + } } /** |