Skip to content
Unverified Commit 4df2f5e1 authored by Clark Wang's avatar Clark Wang Committed by Mark Brown
Browse files

spi: imx: add a check for speed_hz before calculating the clock



When some drivers use spi to send data, spi_transfer->speed_hz is
not assigned. If spidev->max_speed_hz is not assigned as well, it
will cause an error in configuring the clock.
Add a check for these two values before configuring the clock. An
error will be returned when they are not assigned.

Signed-off-by: default avatarClark Wang <xiaoning.wang@nxp.com>
Link: https://lore.kernel.org/r/20210408103347.244313-2-xiaoning.wang@nxp.com


Signed-off-by: default avatarMark Brown <broonie@kernel.org>
parent a23faea7
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment