regulator: lp8755: Fix lp8755_regulator_init unwind code
authorAxel Lin <axel.lin@ingics.com>
Tue, 25 Dec 2012 02:06:20 +0000 (10:06 +0800)
committerMark Brown <broonie@opensource.wolfsonmicro.com>
Tue, 8 Jan 2013 11:05:26 +0000 (11:05 +0000)
commita1a41ab4e92a42d380286a6aadb1026a2b352801
tree615012dc8f0b2b6b0cc9f98744df876e2120d75b
parentb59320cc5a5e6ceaa17f0895ffbe0711ebad7adf
regulator: lp8755: Fix lp8755_regulator_init unwind code

It's safe to pass NULL argument to regulator_unregister(), so we can remove
the NULL checking before calling regulator_unregister().
However pass a ERR_PTR to regulator_unregister() is wrong, so we need to
explicitly set "pchip->rdev[buck_num] = NULL" before goto err_buck.

This patch also includes below cleanups:
Show correct regulator id in dev_err.
Remove __devexit_p.

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