mirror of
https://github.com/Fishwaldo/u-boot.git
synced 2025-03-21 14:41:31 +00:00
serial: stm32: Fix warnings when compiling with W=1
This patch solves the following warnings: drivers/serial/serial_stm32.c: In function 'stm32_serial_probe': warning: comparison of unsigned expression < 0 is always false [-Wtype-limits] if (plat->clock_rate < 0) { ^ Signed-off-by: Patrice Chotard <patrice.chotard@st.com> Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>
This commit is contained in:
parent
8e1947774e
commit
585289b4fc
1 changed files with 2 additions and 2 deletions
|
@ -195,9 +195,9 @@ static int stm32_serial_probe(struct udevice *dev)
|
|||
}
|
||||
|
||||
plat->clock_rate = clk_get_rate(&clk);
|
||||
if (plat->clock_rate < 0) {
|
||||
if (!plat->clock_rate) {
|
||||
clk_disable(&clk);
|
||||
return plat->clock_rate;
|
||||
return -EINVAL;
|
||||
};
|
||||
|
||||
_stm32_serial_init(plat->base, plat->uart_info);
|
||||
|
|
Loading…
Add table
Reference in a new issue