]> git.baikalelectronics.ru Git - kernel.git/commit
regulator: Fix rc5t583_regulator_probe error handling
authorAxel Lin <axel.lin@gmail.com>
Wed, 4 Apr 2012 11:52:35 +0000 (19:52 +0800)
committerMark Brown <broonie@opensource.wolfsonmicro.com>
Wed, 4 Apr 2012 21:13:32 +0000 (22:13 +0100)
commite7915fdbb7b471b4d257a1bd76552d56017c524c
tree0dd61511a4e0218e41ee8827e76fae8a4b948b44
parentb8671306dd0ac458919090173cec61f07bd688c0
regulator: Fix rc5t583_regulator_probe error handling

1. regulator_register returns ERR_PTR on error, thus use IS_ERR to check the
   return value.
2. Fix off-by-one for unregistering the registered regulator.
   Current code does not unregister regs[0].rdev in clean_exit.

Signed-off-by: Axel Lin <axel.lin@gmail.com>
Acked-by: Laxman Dewangan <ldewangan@nvidia.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
drivers/regulator/rc5t583-regulator.c