Re: [PATCH 5/5] regmap: Do not call regcache_exit fromregcache_lzo_init error path

From: Mark Brown
Date: Mon Nov 14 2011 - 16:43:13 EST


On Mon, Nov 14, 2011 at 10:40:19AM +0100, Lars-Peter Clausen wrote:
> Calling regcache_exit from regcache_lzo_init is a layering violation and
> might cause double frees. In case of an error only free those structures which
> have been allocated in this function.

You should also be explaining here why the cleanup done the core exit
function is still being done when the code is changed this way. The
fact that it may be a layering violation doesn't mean that the cleanup
is actually being done anywhere else...
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/