Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

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>

authored by

Andrew Davis and committed by
Lee Jones
ca4b5ff8 67a4a344

+3 -6
+3 -6
drivers/leds/leds-lp8860.c
··· 185 185 186 186 static int lp8860_program_eeprom(struct lp8860_led *led) 187 187 { 188 - unsigned int read_buf; 189 188 int ret, reg_count; 190 189 191 190 guard(mutex)(&led->lock); 192 191 193 192 ret = lp8860_fault_check(led); 194 - if (ret) 193 + if (ret) { 194 + dev_err(&led->client->dev, "Cannot read/clear faults\n"); 195 195 return ret; 196 - 197 - ret = regmap_read(led->regmap, LP8860_STATUS, &read_buf); 198 - if (ret) 199 - return ret; 196 + } 200 197 201 198 ret = regmap_write(led->regmap, LP8860_EEPROM_UNLOCK, LP8860_EEPROM_CODE_1); 202 199 if (ret) {