diff --git a/drivers/led/is31fl3194.c b/drivers/led/is31fl3194.c index d95a8f59d56..5e9466ca13f 100644 --- a/drivers/led/is31fl3194.c +++ b/drivers/led/is31fl3194.c @@ -145,10 +145,6 @@ static int is31fl3194_set_brightness(const struct device *dev, uint32_t led, uin return -ENOTSUP; } - if (value > LED_BRIGTHNESS_MAX) { - return -EINVAL; - } - /* Rescale 0..100 to 0..255 */ value = value * 255 / LED_BRIGTHNESS_MAX; diff --git a/drivers/led/is31fl3216a.c b/drivers/led/is31fl3216a.c index 288d6a73ecf..cc391a6a48d 100644 --- a/drivers/led/is31fl3216a.c +++ b/drivers/led/is31fl3216a.c @@ -111,7 +111,7 @@ static int is31fl3216a_led_set_brightness(const struct device *dev, int status; uint8_t pwm_value; - if (led > IS31FL3216A_MAX_LEDS - 1 || value > LED_BRIGTHNESS_MAX) { + if (led > IS31FL3216A_MAX_LEDS - 1) { return -EINVAL; } diff --git a/drivers/led/led_gpio.c b/drivers/led/led_gpio.c index aa5f6f5661a..433dcca0dc5 100644 --- a/drivers/led/led_gpio.c +++ b/drivers/led/led_gpio.c @@ -30,7 +30,7 @@ static int led_gpio_set_brightness(const struct device *dev, uint32_t led, uint8 const struct led_gpio_config *config = dev->config; const struct gpio_dt_spec *led_gpio; - if ((led >= config->num_leds) || (value > LED_BRIGTHNESS_MAX)) { + if (led >= config->num_leds) { return -EINVAL; } diff --git a/drivers/led/led_pwm.c b/drivers/led/led_pwm.c index 14d5e6dff85..b35e28a7928 100644 --- a/drivers/led/led_pwm.c +++ b/drivers/led/led_pwm.c @@ -58,7 +58,7 @@ static int led_pwm_set_brightness(const struct device *dev, const struct led_pwm_config *config = dev->config; const struct pwm_dt_spec *dt_led; - if (led >= config->num_leds || value > LED_BRIGTHNESS_MAX) { + if (led >= config->num_leds) { return -EINVAL; } diff --git a/drivers/led/lp50xx.c b/drivers/led/lp50xx.c index 98593f56b9b..2d6bb904b37 100644 --- a/drivers/led/lp50xx.c +++ b/drivers/led/lp50xx.c @@ -124,12 +124,6 @@ static int lp50xx_set_brightness(const struct device *dev, return -ENODEV; } - if (value > LED_BRIGTHNESS_MAX) { - LOG_ERR("%s: brightness value out of bounds: val=%d, max=%d", - dev->name, value, LED_BRIGTHNESS_MAX); - return -EINVAL; - } - buf[0] = LP50XX_LED0_BRIGHTNESS(config->num_modules) + led_info->index; buf[1] = (value * 0xff) / LED_BRIGTHNESS_MAX; diff --git a/drivers/led/lp5569.c b/drivers/led/lp5569.c index 5df014ede7c..ee115f8425c 100644 --- a/drivers/led/lp5569.c +++ b/drivers/led/lp5569.c @@ -49,7 +49,7 @@ static int lp5569_led_set_brightness(const struct device *dev, uint32_t led, uin uint8_t val; int ret; - if (led >= LP5569_NUM_LEDS || brightness > LED_BRIGTHNESS_MAX) { + if (led >= LP5569_NUM_LEDS) { return -EINVAL; } diff --git a/drivers/led/ncp5623.c b/drivers/led/ncp5623.c index 661f3900dfb..663ebacba2a 100644 --- a/drivers/led/ncp5623.c +++ b/drivers/led/ncp5623.c @@ -100,10 +100,6 @@ static int ncp5623_set_brightness(const struct device *dev, uint32_t led, uint8_ return -ENODEV; } - if (value > LED_BRIGTHNESS_MAX) { - return -EINVAL; - } - if (led_info->num_colors != 1) { return -ENOTSUP; }