diff options
Diffstat (limited to 'sys/arm')
-rw-r--r-- | sys/arm/at91/at91.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/sys/arm/at91/at91.c b/sys/arm/at91/at91.c index 67a82ed..60f6a02 100644 --- a/sys/arm/at91/at91.c +++ b/sys/arm/at91/at91.c @@ -534,8 +534,10 @@ at91_alloc_resource(device_t dev, device_t child, int type, int *rid, case SYS_RES_MEMORY: rle->res = rman_reserve_resource(&sc->sc_mem_rman, start, end, count, flags, child); - rman_set_bustag(rle->res, &at91_bs_tag); - rman_set_bushandle(rle->res, start); + if (rle->res != NULL) { + rman_set_bustag(rle->res, &at91_bs_tag); + rman_set_bushandle(rle->res, start); + } break; } if (rle->res) { |