Gedare Bloom started a new discussion on 
testsuites/libtests/iodev01/test_iodev.c: 
https://gitlab.rtems.org/rtems/rtos/rtems/-/merge_requests/1243#note_152632

 > +    sizeof( rtems_iodev )
 > +  );
 > +
 > +  if ( tiodev.iodev == NULL ) {
 > +    return NULL;
 > +  }
 > +
 > +  rtems_mutex_init( &tiodev.lock, "test_iodev" );
 > +  rtems_mutex_lock( &tiodev.lock );
 > +  tiodev.waiting = false;
 > +  rtems_mutex_unlock( &tiodev.lock );
 > +
 > +  tiodev.regions[0].index = 0;
 > +  tiodev.regions[0].address = malloc(TEST_IODEV_REGION_SIZE);
 > +  if (tiodev.regions[0].address == NULL) {
 > +    rtems_iodev_destroy_unregistered( tiodev.iodev );

should you return `NULL` in the error paths?

-- 
View it on GitLab: 
https://gitlab.rtems.org/rtems/rtos/rtems/-/merge_requests/1243#note_152632
You're receiving this email because of your account on gitlab.rtems.org.


_______________________________________________
bugs mailing list
[email protected]
http://lists.rtems.org/mailman/listinfo/bugs

Reply via email to