diff options
Diffstat (limited to 'drivers/leds/leds-lp55xx-common.c')
-rw-r--r-- | drivers/leds/leds-lp55xx-common.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/drivers/leds/leds-lp55xx-common.c b/drivers/leds/leds-lp55xx-common.c index 74beb36..c06745f 100644 --- a/drivers/leds/leds-lp55xx-common.c +++ b/drivers/leds/leds-lp55xx-common.c @@ -144,9 +144,18 @@ int lp55xx_init_device(struct lp55xx_chip *chip) /* chip specific initialization */ ret = lp55xx_post_init_device(chip); + if (ret) { + dev_err(dev, "post init device err: %d\n", ret); + goto err_post_init; + } return 0; +err_post_init: + if (pdata->enable) + pdata->enable(0); + if (pdata->release_resources) + pdata->release_resources(); err: return ret; } |