summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStephan Gerhold <[email protected]>2025-04-07 13:10:00 +0200
committerTom Rini <[email protected]>2025-04-14 16:57:06 -0600
commit265420ebc10bc96275be5eb81fe6157d46e135d4 (patch)
treec58a0c6df5f667361b372069d2f237fcbeee96dc
parent8c98b57d72d5e5b94ed064fe1041e51216165334 (diff)
IOMUX: Fix stopping unused dropped consoles
iomux_match_device() returns -ENOENT instead of the end index, which means console_stop() is never called at the moment for unused consoles. This prevents e.g. f_acm from releasing the USB gadget interface when removing it from stdio/stderr/stdin. Fixes: b672c1619bb9 ("IOMUX: Split out iomux_match_device() helper") Signed-off-by: Stephan Gerhold <[email protected]> Reviewed-by: Andy Shevchenko <[email protected]>
-rw-r--r--common/iomux.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/common/iomux.c b/common/iomux.c
index 1224c15eb71..4844df51fbe 100644
--- a/common/iomux.c
+++ b/common/iomux.c
@@ -131,7 +131,7 @@ int iomux_doenv(const int console, const char *arg)
/* Stop dropped consoles */
for (i = 0; i < repeat; i++) {
j = iomux_match_device(cons_set, cs_idx, old_set[i]);
- if (j == cs_idx)
+ if (j == -ENOENT)
console_stop(console, old_set[i]);
}