What I meant was that I'm generally opposed to "common exit paths".
Mixing all the exit paths together often makes the code more complicated
and leads to errors. That makes sense from a common sense perspective
that doing many things is more difficult than doing one thing? Anyway
it's easy enough to verify empirically that this style is bug prone.
On the other hand there are times where all exit paths need to unlock or
to free a variable and in those cases using a common exit path makes
sense. Just don't standardize on "Every function should only have a
single return".
If we *have* to change it
I don't think we have to change it at all. Using direct returns makes
finding locking bugs easier for static checkers.
spin_unlock_irqrestore(&devdata->priv_lock, flags);
This is a bug.