svn commit: r184309 - head/sys/arm/at91
Stanislav Sedov
stas at FreeBSD.org
Sun Oct 26 15:52:57 PDT 2008
Author: stas
Date: Sun Oct 26 22:52:57 2008
New Revision: 184309
URL: http://svn.freebsd.org/changeset/base/184309
Log:
- Add a missing NULL-pointer check.
Reviewed by: cognet
Approved by: kib (mentor, implicit)
MFC after: 3 days
Modified:
head/sys/arm/at91/at91.c
Modified: head/sys/arm/at91/at91.c
==============================================================================
--- head/sys/arm/at91/at91.c Sun Oct 26 22:46:37 2008 (r184308)
+++ head/sys/arm/at91/at91.c Sun Oct 26 22:52:57 2008 (r184309)
@@ -534,8 +534,10 @@ at91_alloc_resource(device_t dev, device
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) {
More information about the svn-src-head
mailing list