]> git.baikalelectronics.ru Git - kernel.git/commit
regulator: max8997: Convert ot use devm_kzalloc
authorAxel Lin <axel.lin@gmail.com>
Thu, 19 Apr 2012 01:44:13 +0000 (09:44 +0800)
committerMark Brown <broonie@opensource.wolfsonmicro.com>
Mon, 23 Apr 2012 12:20:26 +0000 (13:20 +0100)
commit3e225063dc9f24a6dae0e110797e2ed9fb36b65a
treeeeb5fae803f580dd5dad722fb5c71dbff29e2d8b
parent39909dd6a08d8f66e7f4f296d26b01e4aa2c04e7
regulator: max8997: Convert ot use devm_kzalloc

Also simplify the error handling to start unwind from the place
regulator_register fails.

No need to check rdev[i] is NULL or not before calling regulator_unregister.
regulator_unregister is safe if rdev is NULL,

Signed-off-by: Axel Lin <axel.lin@gmail.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
drivers/regulator/max8997.c