mirror of
https://github.com/torvalds/linux.git
synced 2026-05-30 10:04:04 +02:00
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:
parent
67a4a344f7
commit
ca4b5ff8ab
|
|
@ -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) {
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user