]> git.karo-electronics.de Git - linux-beck.git/commit
regulator: rk808: Fix memory leak
authorAxel Lin <axel.lin@ingics.com>
Thu, 28 Aug 2014 13:04:49 +0000 (21:04 +0800)
committerMark Brown <broonie@linaro.org>
Thu, 28 Aug 2014 15:01:25 +0000 (16:01 +0100)
commitc61519fd9abb1b520bcbe2eb21cf161d4d1b9eec
treee4ef84b58e7d72ed809e5e3e8c25884d09f679bb
parent2a8d1303c6618f44e7603a4625783d1aff5fef4a
regulator: rk808: Fix memory leak

The memory allocated in rk808_regulator_probe() needs to be freed when the
module is unloaded. Thus pass &pdev->dev rather than &client->dev to
devm_kzalloc.

Signed-off-by: Axel Lin <axel.lin@ingics.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
drivers/regulator/rk808-regulator.c