Skip to content

Commit

Permalink
[PATCH] powerpc: Loosen udbg_probe_uart_speed sanity checking
Browse files Browse the repository at this point in the history
The checking of the baudrate in udbg_probe_uart_speed was
too tight and would cause reporting back of the default
baud rate in cases where the computed speed was valid.

Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
Signed-off-by: Paul Mackerras <paulus@samba.org>
  • Loading branch information
Kumar Gala authored and Paul Mackerras committed Jan 9, 2006
1 parent b226e46 commit d0e132b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion arch/powerpc/kernel/udbg_16550.c
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,7 @@ unsigned int udbg_probe_uart_speed(void __iomem *comport, unsigned int clock)
speed = (clock / prescaler) / (divisor * 16);

/* sanity check */
if (speed < 9600 || speed > 115200)
if (speed < 0 || speed > (clock / 16))
speed = 9600;

return speed;
Expand Down

0 comments on commit d0e132b

Please sign in to comment.