Skip to content

Commit 06bab1f

Browse files
Bartosz Golaszewskibroonie
authored andcommitted
regulator: rpi-panel-attiny: don't double-check GPIO range
GPIO core already checks GPIO ranges, there's no need to check it again in the set() callback. Signed-off-by: Bartosz Golaszewski <[email protected]> Link: https://patch.msgid.link/[email protected] Signed-off-by: Mark Brown <[email protected]>
1 parent 0af2f6b commit 06bab1f

File tree

1 file changed

+0
-3
lines changed

1 file changed

+0
-3
lines changed

drivers/regulator/rpi-panel-attiny-regulator.c

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -216,9 +216,6 @@ static void attiny_gpio_set(struct gpio_chip *gc, unsigned int off, int val)
216216
struct attiny_lcd *state = gpiochip_get_data(gc);
217217
u8 last_val;
218218

219-
if (off >= NUM_GPIO)
220-
return;
221-
222219
mutex_lock(&state->lock);
223220

224221
last_val = attiny_get_port_state(state, mappings[off].reg);

0 commit comments

Comments
 (0)