On Sat, Apr 23, 2022 at 02:01:11PM -0400, Ian Cowan wrote: > Refactor the cedrus_open() function so that there is only one exit to > the function instead of 2. This prevents a future change from preventing > the mutex from being unlocked after a successful exit. > > Signed-off-by: Ian Cowan <ian@xxxxxxxxxxxxxxxx> No. You are just making the code ugly and complicated for no reason. I work in static analysis so I have focussed a lot of attention on locking bugs. In real life this theory is totally bogus. Single exit paths only cause bugs, they don't prevent bugs. regards, dan carpenter