mirror of
https://github.com/linux-msm/laptops-kernel.git
synced 2026-08-13 14:19:53 -07: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:
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user