Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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>

authored by

Tomi Valkeinen and committed by
Pavel Machek
ba50e011 ca995226

+3 -2
+3 -2
drivers/leds/leds-tlc591xx.c
··· 214 214 err = devm_led_classdev_register_ext(dev, &led->ldev, 215 215 &init_data); 216 216 if (err < 0) { 217 - dev_err(dev, "couldn't register LED %s\n", 218 - led->ldev.name); 217 + if (err != -EPROBE_DEFER) 218 + dev_err(dev, "couldn't register LED %s\n", 219 + led->ldev.name); 219 220 return err; 220 221 } 221 222 }