]> www.pilppa.org Git - linux-2.6-omap-h63xx.git/commitdiff
powerpc: Unsigned speed cannot be negative in udbg_16559.c
authorroel kluin <roel.kluin@gmail.com>
Tue, 14 Oct 2008 14:36:31 +0000 (14:36 +0000)
committerBenjamin Herrenschmidt <benh@kernel.crashing.org>
Tue, 21 Oct 2008 04:17:47 +0000 (15:17 +1100)
"unsigned int" speed cannot be negative, it's thus pointless
to test if it is.

Signed-off-by: Roel Kluin <roel.kluin@gmail.com>
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
arch/powerpc/kernel/udbg_16550.c

index cb01ebc593876b5736cc96640904a8117a5da3c6..7b7da8cfd5e862364feb391e4a3cc68447cfdec2 100644 (file)
@@ -142,7 +142,7 @@ unsigned int udbg_probe_uart_speed(void __iomem *comport, unsigned int clock)
        speed = (clock / prescaler) / (divisor * 16);
 
        /* sanity check */
-       if (speed < 0 || speed > (clock / 16))
+       if (speed > (clock / 16))
                speed = 9600;
 
        return speed;