drivers: gpio: sifive: remove unnecessary check

The API already asserts for invalid pin based on DT `ngpios` property.

Signed-off-by: Gerard Marull-Paretas <gerard@teslabs.com>
This commit is contained in:
Gerard Marull-Paretas 2024-01-16 15:05:26 +01:00 committed by Fabio Baltieri
parent 0363b74b38
commit 9e8bd2f976

View file

@ -145,10 +145,6 @@ static int gpio_sifive_config(const struct device *dev,
{ {
volatile struct gpio_sifive_t *gpio = DEV_GPIO(dev); volatile struct gpio_sifive_t *gpio = DEV_GPIO(dev);
if (pin >= SIFIVE_PINMUX_PINS) {
return -EINVAL;
}
/* We cannot support open-source open-drain configuration */ /* We cannot support open-source open-drain configuration */
if ((flags & GPIO_SINGLE_ENDED) != 0) { if ((flags & GPIO_SINGLE_ENDED) != 0) {
return -ENOTSUP; return -ENOTSUP;