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>
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) {