Re: [PATCH] regulator: core: avoid memory access after freeing it

From: Mark Brown
Date: Tue Nov 06 2012 - 06:31:30 EST


On Tue, Nov 06, 2012 at 11:12:56AM +0000, Charles Keepax wrote:

> Here would it not make sense to go slightly further and basically
> revert my original change. This feels sensible as it keeps it at
> only one location where the mutex is unlocked and removes the
> second exit point I added. This would effectively make the code
> look like:

Given the bug that was reported with your original change and the lack
of any fix I'm actually just going to discard it anyway, just didn't get
around to it yet.

A single exit path would be simpler and hence better.

Attachment: signature.asc
Description: Digital signature