git: e0c83ab3b362 - main - gpioled: remove redundant -1 check
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Thu, 18 Sep 2025 22:08:07 UTC
The branch main has been updated by vexeduxr:
URL: https://cgit.FreeBSD.org/src/commit/?id=e0c83ab3b362c9bd45c5d21683012cecab28d802
commit e0c83ab3b362c9bd45c5d21683012cecab28d802
Author: Ahmad Khalifa <vexeduxr@FreeBSD.org>
AuthorDate: 2025-09-18 22:03:32 +0000
Commit: Ahmad Khalifa <vexeduxr@FreeBSD.org>
CommitDate: 2025-09-18 22:06:37 +0000
gpioled: remove redundant -1 check
The function is never called with onoff = -1
MFC after: 3 days
MFC with: 9ae3c30
---
sys/dev/gpio/gpioled.c | 2 --
1 file changed, 2 deletions(-)
diff --git a/sys/dev/gpio/gpioled.c b/sys/dev/gpio/gpioled.c
index 71af5741b2fe..a36c2faef379 100644
--- a/sys/dev/gpio/gpioled.c
+++ b/sys/dev/gpio/gpioled.c
@@ -75,8 +75,6 @@ gpioled_control(void *priv, int onoff)
struct gpioled_softc *sc;
sc = (struct gpioled_softc *)priv;
- if (onoff == -1) /* Keep the current state. */
- return;
if (sc->sc_softinvert)
onoff = !onoff;
GPIOLED_LOCK(sc);