summaryrefslogtreecommitdiffstats
path: root/include/serial/lpuart.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/serial/lpuart.h')
-rw-r--r--include/serial/lpuart.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/include/serial/lpuart.h b/include/serial/lpuart.h
index a920291..9c6e271 100644
--- a/include/serial/lpuart.h
+++ b/include/serial/lpuart.h
@@ -228,6 +228,8 @@ static inline void lpuart_setbrg(void __iomem *base,
unsigned int bfra;
u16 sbr;
+ BUG_ON(!baudrate);
+
sbr = (u16) (refclock / (16 * baudrate));
writeb(sbr >> 8, base + UARTBDH);