summaryrefslogtreecommitdiffstats
path: root/drivers/leds
diff options
context:
space:
mode:
authorTomi Valkeinen <tomi.valkeinen@ti.com>2020-04-17 14:37:58 +0300
committerPavel Machek <pavel@ucw.cz>2020-04-17 15:39:07 +0200
commitba50e011b142cfe739ff2c64957dbba95797a912 (patch)
tree9cc3cce2693c8af98a6b9c4fbf793e69610f6940 /drivers/leds
parentca99522667ad239267e3c17773dbabb482c1ceac (diff)
downloadlinux-ba50e011b142cfe739ff2c64957dbba95797a912.tar.bz2
leds: tlc591xxt: hide error on EPROBE_DEFER
If devm_led_classdev_register_ext() fails with EPROBE_DEFER, we get: tlc591xx 0-0040: couldn't register LED (null) Only print the error if the error is something else than EPROBE_DEFER. Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com> Reviewed-by: Dan Murphy <dmurphy@ti.com> Signed-off-by: Pavel Machek <pavel@ucw.cz>
Diffstat (limited to 'drivers/leds')
-rw-r--r--drivers/leds/leds-tlc591xx.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/drivers/leds/leds-tlc591xx.c b/drivers/leds/leds-tlc591xx.c
index a8911ebd30e5..0929f1275814 100644
--- a/drivers/leds/leds-tlc591xx.c
+++ b/drivers/leds/leds-tlc591xx.c
@@ -214,8 +214,9 @@ tlc591xx_probe(struct i2c_client *client,
err = devm_led_classdev_register_ext(dev, &led->ldev,
&init_data);
if (err < 0) {
- dev_err(dev, "couldn't register LED %s\n",
- led->ldev.name);
+ if (err != -EPROBE_DEFER)
+ dev_err(dev, "couldn't register LED %s\n",
+ led->ldev.name);
return err;
}
}