diff options
author | stas <stas@FreeBSD.org> | 2008-10-26 22:52:57 +0000 |
---|---|---|
committer | stas <stas@FreeBSD.org> | 2008-10-26 22:52:57 +0000 |
commit | e29a55524b140c8d6ea57e36772e832d4dd0cd68 (patch) | |
tree | 99d73c2774a414db0a9e64bbd37cbf849212a204 | |
parent | 432d006baee145f31cb162ef67acf255de6b4635 (diff) | |
download | FreeBSD-src-e29a55524b140c8d6ea57e36772e832d4dd0cd68.zip FreeBSD-src-e29a55524b140c8d6ea57e36772e832d4dd0cd68.tar.gz |
- Add a missing NULL-pointer check.
Reviewed by: cognet
Approved by: kib (mentor, implicit)
MFC after: 3 days
-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) { |