regulator: fix device_register() error handling
authorVasiliy Kulikov <segooon@gmail.com>
Sun, 19 Sep 2010 12:55:01 +0000 (16:55 +0400)
committerLiam Girdwood <lrg@slimlogic.co.uk>
Sat, 2 Oct 2010 11:50:30 +0000 (12:50 +0100)
commitad7725cb43b8badb2fec2c2bfca07c067f2e19a7
tree16c7c2a6ec9605be409677eb1bf1993d208fd4be
parentc6ea21e35bf3691cad59647c771e6606067f627d
regulator: fix device_register() error handling

If device_register() fails then call put_device().
See comment to device_register.

Signed-off-by: Vasiliy Kulikov <segooon@gmail.com>
Acked-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Signed-off-by: Liam Girdwood <lrg@slimlogic.co.uk>
drivers/regulator/core.c