diff options
| author | Clark Wang <xiaoning.wang@nxp.com> | 2021-04-08 13:33:47 +0300 |
|---|---|---|
| committer | Mark Brown <broonie@kernel.org> | 2021-04-09 15:44:01 +0300 |
| commit | 4df2f5e1372e9eec8f9e1b4a3025b9be23487d36 (patch) | |
| tree | 626ba4532247f046e6af6f2cfb158512f9e3f696 /lib/mpi/mpi-sub-ui.c | |
| parent | a23faea76d4cf5f75decb574491e66f9ecd707e7 (diff) | |
| download | linux-4df2f5e1372e9eec8f9e1b4a3025b9be23487d36.tar.xz | |
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/mpi/mpi-sub-ui.c')
0 files changed, 0 insertions, 0 deletions
