leds: lp8860: Remove unused read of STATUS register

This register is read but the contents are never checked, remove
the read until we add status checking. While here add an error
message should the preceding fault check fail.

Signed-off-by: Andrew Davis <afd@ti.com>
Link: https://patch.msgid.link/20260305203706.841384-4-afd@ti.com
Signed-off-by: Lee Jones <lee@kernel.org>
This commit is contained in:
Andrew Davis 2026-03-05 14:37:05 -06:00 committed by Lee Jones
parent 67a4a344f7
commit ca4b5ff8ab

View File

@ -185,18 +185,15 @@ static int lp8860_brightness_set(struct led_classdev *led_cdev,
static int lp8860_program_eeprom(struct lp8860_led *led)
{
unsigned int read_buf;
int ret, reg_count;
guard(mutex)(&led->lock);
ret = lp8860_fault_check(led);
if (ret)
return ret;
ret = regmap_read(led->regmap, LP8860_STATUS, &read_buf);
if (ret)
if (ret) {
dev_err(&led->client->dev, "Cannot read/clear faults\n");
return ret;
}
ret = regmap_write(led->regmap, LP8860_EEPROM_UNLOCK, LP8860_EEPROM_CODE_1);
if (ret) {