summaryrefslogtreecommitdiff
path: root/drivers/leds/leds-tlc591xx.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/leds/leds-tlc591xx.c')
-rw-r--r--drivers/leds/leds-tlc591xx.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/drivers/leds/leds-tlc591xx.c b/drivers/leds/leds-tlc591xx.c
index 59ff088c7d75..00702824d27c 100644
--- a/drivers/leds/leds-tlc591xx.c
+++ b/drivers/leds/leds-tlc591xx.c
@@ -147,7 +147,10 @@ tlc591xx_configure(struct device *dev,
unsigned int i;
int err = 0;
- tlc591xx_set_mode(priv->regmap, MODE2_DIM);
+ err = tlc591xx_set_mode(priv->regmap, MODE2_DIM);
+ if (err < 0)
+ return err;
+
for (i = 0; i < TLC591XX_MAX_LEDS; i++) {
struct tlc591xx_led *led = &priv->leds[i];