aboutsummaryrefslogtreecommitdiff
path: root/sys/dev/uart/uart_dev_z8530.c
diff options
context:
space:
mode:
Diffstat (limited to 'sys/dev/uart/uart_dev_z8530.c')
-rw-r--r--sys/dev/uart/uart_dev_z8530.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/sys/dev/uart/uart_dev_z8530.c b/sys/dev/uart/uart_dev_z8530.c
index 4bde071b33dc6..c34b0a451fc08 100644
--- a/sys/dev/uart/uart_dev_z8530.c
+++ b/sys/dev/uart/uart_dev_z8530.c
@@ -71,7 +71,7 @@ z8530_divisor(int rclk, int baudrate)
return (0);
divisor = (rclk + baudrate) / (baudrate << 1) - 2;
- if (divisor >= 65536)
+ if (divisor < 0 || divisor >= 65536)
return (0);
act_baud = rclk / 2 / (divisor + 2);