diff options
author | Clark Wang <xiaoning.wang@nxp.com> | 2021-04-08 18:33:47 +0800 |
---|---|---|
committer | Mark Brown <broonie@kernel.org> | 2021-04-09 13:44:01 +0100 |
commit | 4df2f5e1372e9eec8f9e1b4a3025b9be23487d36 (patch) | |
tree | 626ba4532247f046e6af6f2cfb158512f9e3f696 /lib/test_string.c | |
parent | a23faea76d4cf5f75decb574491e66f9ecd707e7 (diff) |
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: Clark Wang <xiaoning.wang@nxp.com>
Link: https://lore.kernel.org/r/20210408103347.244313-2-xiaoning.wang@nxp.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to 'lib/test_string.c')
0 files changed, 0 insertions, 0 deletions