diff options
Diffstat (limited to 'cpukit/rtems/src/regioncreate.c')
-rw-r--r-- | cpukit/rtems/src/regioncreate.c | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/cpukit/rtems/src/regioncreate.c b/cpukit/rtems/src/regioncreate.c index 5481505276..3aeb78ef0e 100644 --- a/cpukit/rtems/src/regioncreate.c +++ b/cpukit/rtems/src/regioncreate.c @@ -38,9 +38,9 @@ * id - address of region id to set * * Output parameters: - * id - region id + * id - region id * RTEMS_SUCCESSFUL - if successful - * error code - if unsuccessful + * error code - if unsuccessful */ rtems_status_code rtems_region_create( @@ -48,7 +48,7 @@ rtems_status_code rtems_region_create( void *starting_address, uint32_t length, uint32_t page_size, - rtems_attribute attribute_set, + rtems_attribute attribute_set, Objects_Id *id ) { @@ -57,6 +57,12 @@ rtems_status_code rtems_region_create( if ( !rtems_is_name_valid( name ) ) return RTEMS_INVALID_NAME; + if ( !starting_address ) + return RTEMS_INVALID_ADDRESS; + + if ( !id ) + return RTEMS_INVALID_ADDRESS; + if ( !_Addresses_Is_aligned( starting_address ) ) return RTEMS_INVALID_ADDRESS; |