]> git.ipfire.org Git - thirdparty/linux.git/commitdiff
regulator: rpi-panel-attiny: don't double-check GPIO range
authorBartosz Golaszewski <bartosz.golaszewski@linaro.org>
Tue, 8 Apr 2025 07:36:28 +0000 (09:36 +0200)
committerMark Brown <broonie@kernel.org>
Tue, 8 Apr 2025 11:05:40 +0000 (12:05 +0100)
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>
drivers/regulator/rpi-panel-attiny-regulator.c

index 6c3b6bfac961d70c1dc9abc145837fd266d658ae..f5ce50ced294dee6f74f0cb5c2af7bcda6986247 100644 (file)
@@ -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);