diff options
author | Devyn Liu <liudingyuan@huawei.com> | 2024-07-30 11:20:39 +0800 |
---|---|---|
committer | Mark Brown <broonie@kernel.org> | 2024-07-30 13:27:37 +0100 |
commit | c3c4f22b7c814a6ee485ce294065836f8ede30fa (patch) | |
tree | 7d21b972d6197098ac8e5574e353878f4298702a /lib/crypto/mpi/mpi-internal.h | |
parent | 8400291e289ee6b2bf9779ff1c83a291501f017b (diff) |
spi: hisi-kunpeng: Add validation for the minimum value of speed_hz
The speed specified by the user is used to calculate the clk_div based
on the max_speed_hz in hisi_calc_effective_speed. A very low speed
value can lead to a clk_div larger than the variable range. Avoid this
by setting the min_speed_hz so that such a small speed value is
rejected. __spi_validate() in spi.c will return -EINVAL for the
specified speed_hz lower than min_speed_hz.
Signed-off-by: Devyn Liu <liudingyuan@huawei.com>
Reviewed-by: Jay Fang <f.fangjian@huawei.com>
Link: https://patch.msgid.link/20240730032040.3156393-2-liudingyuan@huawei.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to 'lib/crypto/mpi/mpi-internal.h')
0 files changed, 0 insertions, 0 deletions