IOMUX: Fix stopping unused dropped consoles
authorStephan Gerhold <stephan.gerhold@linaro.org>
Mon, 7 Apr 2025 11:10:00 +0000 (13:10 +0200)
committerTom Rini <trini@konsulko.com>
Mon, 14 Apr 2025 22:57:06 +0000 (16:57 -0600)
commit265420ebc10bc96275be5eb81fe6157d46e135d4
treec58a0c6df5f667361b372069d2f237fcbeee96dc
parent8c98b57d72d5e5b94ed064fe1041e51216165334
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 <stephan.gerhold@linaro.org>
Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
common/iomux.c