diff options
| author | Andrew Davis <afd@ti.com> | 2026-03-05 23:37:05 +0300 |
|---|---|---|
| committer | Lee Jones <lee@kernel.org> | 2026-03-10 12:23:12 +0300 |
| commit | ca4b5ff8ab68663afb1316d41f9a2deb9f1dca2e (patch) | |
| tree | d0b2dd1915a7a97d8ef42dbb8811f6b75e9b0b04 | |
| parent | 67a4a344f74cc8d3de9e0bc672143fbd1bcd1b6b (diff) | |
| download | linux-ca4b5ff8ab68663afb1316d41f9a2deb9f1dca2e.tar.xz | |
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>
| -rw-r--r-- | drivers/leds/leds-lp8860.c | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/drivers/leds/leds-lp8860.c b/drivers/leds/leds-lp8860.c index 16129ae94d65..6d1c9434e6d1 100644 --- a/drivers/leds/leds-lp8860.c +++ b/drivers/leds/leds-lp8860.c @@ -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) { |
