aboutsummaryrefslogtreecommitdiffstats
path: root/arch/powerpc/kernel/udbg_16550.c
diff options
context:
space:
mode:
Diffstat (limited to 'arch/powerpc/kernel/udbg_16550.c')
-rw-r--r--arch/powerpc/kernel/udbg_16550.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/arch/powerpc/kernel/udbg_16550.c b/arch/powerpc/kernel/udbg_16550.c
index e58c048a7b19..7541bf44d2da 100644
--- a/arch/powerpc/kernel/udbg_16550.c
+++ b/arch/powerpc/kernel/udbg_16550.c
@@ -137,7 +137,7 @@ unsigned int udbg_probe_uart_speed(void __iomem *comport, unsigned int clock)
137 speed = (clock / prescaler) / (divisor * 16); 137 speed = (clock / prescaler) / (divisor * 16);
138 138
139 /* sanity check */ 139 /* sanity check */
140 if (speed < 9600 || speed > 115200) 140 if (speed < 0 || speed > (clock / 16))
141 speed = 9600; 141 speed = 9600;
142 142
143 return speed; 143 return speed;