Chris Johns commented on a discussion on cpukit/libblock/src/flashdisk.c: https://gitlab.rtems.org/rtems/rtos/rtems/-/merge_requests/912#note_140365 > > return RTEMS_SUCCESSFUL; > } > + > +static void rtems_fdisk_cleanup_helper (rtems_flashdisk *fd, bool > *mutex_initialized) > +{ > + uint32_t device; > + > + if(fd == NULL) > + return; > + > + if((*mutex_initialized) == false) { > + (*mutex_initialized) = true; > + } else { > + rtems_mutex_destroy(&fd->lock); This mutex destroy call returns a `void` so it would appear to be safe to call is the mutex is initialized or not. If this is the case then need to add a `bool` to track the mutex adds nothing to this change. -- View it on GitLab: https://gitlab.rtems.org/rtems/rtos/rtems/-/merge_requests/912#note_140365 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
