Skip to content

Commit ba50e01

Browse files
tombapavelmachek
authored andcommitted
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>
1 parent ca99522 commit ba50e01

1 file changed

Lines changed: 3 additions & 2 deletions

File tree

drivers/leds/leds-tlc591xx.c

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -214,8 +214,9 @@ tlc591xx_probe(struct i2c_client *client,
214214
err = devm_led_classdev_register_ext(dev, &led->ldev,
215215
&init_data);
216216
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);
219220
return err;
220221
}
221222
}

0 commit comments

Comments
 (0)