diff --git a/drivers/spi/kirkwood_spi.c b/drivers/spi/kirkwood_spi.c index 063ed5f35a..bc5da0a1e6 100644 --- a/drivers/spi/kirkwood_spi.c +++ b/drivers/spi/kirkwood_spi.c @@ -115,7 +115,7 @@ static int mvebu_spi_set_speed(struct udevice *bus, uint hz) u32 data, divider; unsigned int spr, sppr; - if (hz > spi->max_hz) { + if (spi->max_hz && (hz > spi->max_hz)) { debug("%s: limit speed to the max_hz of the bus %d\n", __func__, spi->max_hz); hz = spi->max_hz;