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 <[email protected]> Reviewed-by: Dan Murphy <[email protected]> Signed-off-by: Pavel Machek <[email protected]>
1 parent ca99522 commit ba50e01

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

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)