Skip to content

Commit

Permalink
powerpc: Unsigned speed cannot be negative in udbg_16559.c
Browse files Browse the repository at this point in the history
"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>
  • Loading branch information
roel kluin authored and Benjamin Herrenschmidt committed Oct 21, 2008
1 parent 04badfd commit bb5e649
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 @@ -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;
Expand Down

0 comments on commit bb5e649

Please sign in to comment.