summaryrefslogtreecommitdiff
path: root/cpukit/sapi/src/extensioncreate.c
diff options
context:
space:
mode:
Diffstat (limited to 'cpukit/sapi/src/extensioncreate.c')
-rw-r--r--cpukit/sapi/src/extensioncreate.c14
1 files changed, 10 insertions, 4 deletions
diff --git a/cpukit/sapi/src/extensioncreate.c b/cpukit/sapi/src/extensioncreate.c
index 59f41d2ec2..5751f47bef 100644
--- a/cpukit/sapi/src/extensioncreate.c
+++ b/cpukit/sapi/src/extensioncreate.c
@@ -32,15 +32,21 @@ rtems_status_code rtems_extension_create(
{
Extension_Control *the_extension;
- if ( !id )
+ if ( !rtems_is_name_valid( name ) ) {
+ return RTEMS_INVALID_NAME;
+ }
+
+ if ( extension_table == NULL ) {
return RTEMS_INVALID_ADDRESS;
+ }
- if ( !rtems_is_name_valid( name ) )
- return RTEMS_INVALID_NAME;
+ if ( id == NULL ) {
+ return RTEMS_INVALID_ADDRESS;
+ }
the_extension = _Extension_Allocate();
- if ( !the_extension ) {
+ if ( the_extension == NULL ) {
_Objects_Allocator_unlock();
return RTEMS_TOO_MANY;
}