diff options
author | Bartosz Golaszewski <bartosz.golaszewski@linaro.org> | 2025-04-08 10:36:28 +0300 |
---|---|---|
committer | Mark Brown <broonie@kernel.org> | 2025-04-08 14:05:40 +0300 |
commit | 06bab1f101337ae9469a7d2c6ac4de5db64e8160 (patch) | |
tree | 299180ad7413a96dfd6c54d99d5d9f317fed2f94 | |
parent | 0af2f6be1b4281385b618cb86ad946eded089ac8 (diff) | |
download | linux-06bab1f101337ae9469a7d2c6ac4de5db64e8160.tar.xz |
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 <bartosz.golaszewski@linaro.org>
Link: https://patch.msgid.link/20250408-gpiochip-set-rv-regulator-v1-1-a18b6154b31a@linaro.org
Signed-off-by: Mark Brown <broonie@kernel.org>
-rw-r--r-- | drivers/regulator/rpi-panel-attiny-regulator.c | 3 |
1 files changed, 0 insertions, 3 deletions
diff --git a/drivers/regulator/rpi-panel-attiny-regulator.c b/drivers/regulator/rpi-panel-attiny-regulator.c index 6c3b6bfac961..f5ce50ced294 100644 --- a/drivers/regulator/rpi-panel-attiny-regulator.c +++ b/drivers/regulator/rpi-panel-attiny-regulator.c @@ -216,9 +216,6 @@ static void attiny_gpio_set(struct gpio_chip *gc, unsigned int off, int val) struct attiny_lcd *state = gpiochip_get_data(gc); u8 last_val; - if (off >= NUM_GPIO) - return; - mutex_lock(&state->lock); last_val = attiny_get_port_state(state, mappings[off].reg); |