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

2012-11-06 Thread Mark Brown
On Tue, Nov 06, 2012 at 11:12:56AM +, 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

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

2012-11-06 Thread Charles Keepax
On Tue, Nov 06, 2012 at 04:04:09PM +0530, Laxman Dewangan wrote: > When regulator_register() failed due to non availability of > mutex_unlock(_list_mutex); ... > } > EXPORT_SYMBOL_GPL(regulator_put); > @@ -3453,11 +3460,10 @@ scrub: > gpio_free(rdev->ena_gpio); >

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

2012-11-06 Thread Charles Keepax
On Tue, Nov 06, 2012 at 04:04:09PM +0530, Laxman Dewangan wrote: When regulator_register() failed due to non availability of mutex_unlock(regulator_list_mutex); ... } EXPORT_SYMBOL_GPL(regulator_put); @@ -3453,11 +3460,10 @@ scrub: gpio_free(rdev-ena_gpio);

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

2012-11-06 Thread Mark Brown
On Tue, Nov 06, 2012 at 11:12:56AM +, 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