Gedare Bloom started a new discussion on cpukit/dev/can/sja1000/sja1000.c: 
https://gitlab.rtems.org/rtems/rtos/rtems/-/merge_requests/1183#note_148009

 > + */
 > +static int sja1000_start_chip( struct rtems_can_chip *chip )
 > +{
 > +  struct sja1000_internal *internal = chip->internal;
 > +  int ret = 0;
 > +
 > +  rtems_mutex_lock( &chip->lock );
 > +  if ( rtems_can_test_bit( RTEMS_CAN_CHIP_RUNNING, &chip->flags ) ) {
 > +    /* Chip was already configured, skip */
 > +    rtems_mutex_unlock( &chip->lock );
 > +    return 0;
 > +  }
 > +
 > +  ret = sja1000_enable_configuration( internal );
 > +  if ( ret < 0)
 > +    goto start_chip_unlock;

we prefer to avoid `goto` flows. this one is simple enough to turn into a 
function call or just copy-paste the unlock+return

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