From ca4b5ff8ab68663afb1316d41f9a2deb9f1dca2e Mon Sep 17 00:00:00 2001 From: Andrew Davis Date: Thu, 5 Mar 2026 14:37:05 -0600 Subject: [PATCH] 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 Link: https://patch.msgid.link/20260305203706.841384-4-afd@ti.com Signed-off-by: Lee Jones --- drivers/leds/leds-lp8860.c | 9 +++------ 1 file 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) { -- 2.47.3