uvscom: Fix baud rate validation in uvscom_pre_param()

The switch fell through from the supported B150–B115200 cases into default
and returned EINVAL for every speed.  Break out before default so valid
rates return success, matching uvscom_cfg_param().

Signed-off-by: Weixie Cui <cuiweixie@gmail.com>
Reviewed by: imp,aokblast
Pull Request: https://github.com/freebsd/freebsd-src/pull/2110
This commit is contained in:
Weixie Cui
2026-03-31 18:17:28 +08:00
committed by Warner Losh
parent 7634043970
commit 75e7709f4f
+2 -1
View File
@@ -551,8 +551,9 @@ uvscom_pre_param(struct ucom_softc *ucom, struct termios *t)
case B38400:
case B57600:
case B115200:
break;
default:
return (EINVAL);
return (EINVAL);
}
return (0);
}