From 4b2264fa167dab18a97673d45711ce98754b8348 Mon Sep 17 00:00:00 2001 From: Jussi Kivilinna Date: Mon, 15 Apr 2019 07:54:11 -0600 Subject: [PATCH] drivers/leds/userled: Fix ledset validity check in ULEDIOC_SETALL ioctl. --- drivers/leds/userled_upper.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/leds/userled_upper.c b/drivers/leds/userled_upper.c index efb2083733..1e07f69e39 100644 --- a/drivers/leds/userled_upper.c +++ b/drivers/leds/userled_upper.c @@ -461,7 +461,7 @@ static int userled_ioctl(FAR struct file *filep, int cmd, unsigned long arg) /* Verify that a valid LED set was provided */ - if ((ledset & priv->lu_supported) == ledset) + if ((ledset & ~priv->lu_supported) == 0) { /* Update the LED state */