leds: wm8350: Complain if we fail to reenable DCDC
authorMark Brown <broonie@opensource.wolfsonmicro.com>
Wed, 6 Mar 2013 05:01:37 +0000 (21:01 -0800)
committerBryan Wu <cooloney@gmail.com>
Mon, 1 Apr 2013 18:04:49 +0000 (11:04 -0700)
Provide some trace, though the hardware is most likely non-functional if
this happens.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Signed-off-by: Bryan Wu <cooloney@gmail.com>
drivers/leds/leds-wm8350.c

index ed15157..8a181d5 100644 (file)
@@ -129,7 +129,10 @@ static void wm8350_led_disable(struct wm8350_led *led)
        ret = regulator_disable(led->isink);
        if (ret != 0) {
                dev_err(led->cdev.dev, "Failed to disable ISINK: %d\n", ret);
-               regulator_enable(led->dcdc);
+               ret = regulator_enable(led->dcdc);
+               if (ret != 0)
+                       dev_err(led->cdev.dev, "Failed to reenable DCDC: %d\n",
+                               ret);
                return;
        }