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>
This commit is contained in:
Родитель
ca99522667
Коммит
ba50e011b1
|
@ -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;
|
||||
}
|
||||
}
|
||||
|
|
Загрузка…
Ссылка в новой задаче