regmap: Fix memory leak in regmap_init error path
authorLars-Peter Clausen <lars@metafoo.de>
Thu, 10 Nov 2011 17:15:15 +0000 (18:15 +0100)
committerLokesh Pathak <lpathak@nvidia.com>
Mon, 5 Mar 2012 15:49:27 +0000 (07:49 -0800)
commit2769ec26e0419872901e5784bc0a2e1890661714
tree99462646b101435a29babcb21dccdd6f4bfc241b
parentbe467876d52de68446f67d734804a16ffd358d34
regmap: Fix memory leak in regmap_init error path

If regcache initialization fails regmap_init will currently exit without
freeing work_buf.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
(cherry picked from commit 58072cbfc522c2520e34333a53c8f17bb1adb1a0)

Change-Id: I55877ab14da86fbc479a0418c7f5371486574525
Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com>
Reviewed-on: http://git-master/r/87553
drivers/base/regmap/regmap.c