Skip to contentSkip to conversation

unsigned speed cannot be negative

PATCH New roel kluin 1 participant 1 message Oct 14, 2008 PowerPC

lore
Share & tools
lore

roel kluin

author
#0 lore raw

PATCH 1/1 unsigned speed cannot be negative

unsigned speed cannot be negative

---
N.B. It could be possible that a different fix is needed.

arch/powerpc/kernel/udbg_16550.c +1 -1
index cb01ebc..7b7da8c 100644
@@ -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;