Gedare Bloom started a new discussion on bsps/shared/dev/gpio/gpio-support.c: 
https://gitlab.rtems.org/rtems/rtos/rtems/-/merge_requests/1281#note_151680

 >      return RTEMS_UNSATISFIED;
 >    }
 >  
 > +  group->digital_inputs = NULL;
 > +  group->digital_outputs = NULL;
 > +  group->bsp_speficifc_pins = NULL;
 > +
 >    group->input_count = group_definition->input_count;
 >  
 >    if ( group->input_count > 0 ) {
 >      group->digital_inputs =
 >        (uint32_t *) malloc(group->input_count * sizeof(uint32_t));
 >  
 > +    if ( group->digital_inputs == NULL ) {
 > +      sc = RTEMS_NO_MEMORY;
 > +      goto failed_alloc;

we would prefer to avoid `goto` method of handling cleanup. in this case a 
better option would be a static helper function call.

-- 
View it on GitLab: 
https://gitlab.rtems.org/rtems/rtos/rtems/-/merge_requests/1281#note_151680
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