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:
@@ -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);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user