Skip to content
Snippets Groups Projects
Commit bb5e6491 authored by roel kluin's avatar roel kluin Committed by Benjamin Herrenschmidt
Browse files

powerpc: Unsigned speed cannot be negative in udbg_16559.c


"unsigned int" speed cannot be negative, it's thus pointless
to test if it is.

Signed-off-by: default avatarRoel Kluin <roel.kluin@gmail.com>
Signed-off-by: default avatarBenjamin Herrenschmidt <benh@kernel.crashing.org>
parent 04badfd2
No related branches found
No related tags found
No related merge requests found
...@@ -142,7 +142,7 @@ unsigned int udbg_probe_uart_speed(void __iomem *comport, unsigned int clock) ...@@ -142,7 +142,7 @@ unsigned int udbg_probe_uart_speed(void __iomem *comport, unsigned int clock)
speed = (clock / prescaler) / (divisor * 16); speed = (clock / prescaler) / (divisor * 16);
/* sanity check */ /* sanity check */
if (speed < 0 || speed > (clock / 16)) if (speed > (clock / 16))
speed = 9600; speed = 9600;
return speed; return speed;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment