* [PATCH] [POWERPC] unsigned speed cannot be negative
@ 2008-10-15 0:36 roel kluin
0 siblings, 0 replies; only message in thread
From: roel kluin @ 2008-10-15 0:36 UTC (permalink / raw)
To: benh, linuxppc-dev
unsigned speed cannot be negative
Signed-off-by: Roel Kluin <roel.kluin@gmail.com>
---
N.B. It could be possible that a different fix is needed.
diff --git a/arch/powerpc/kernel/udbg_16550.c b/arch/powerpc/kernel/udbg_16550.c
index cb01ebc..7b7da8c 100644
--- a/arch/powerpc/kernel/udbg_16550.c
+++ b/arch/powerpc/kernel/udbg_16550.c
@@ -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;
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2008-10-14 18:36 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-10-15 0:36 [PATCH] [POWERPC] unsigned speed cannot be negative roel kluin
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).