mirror of
https://github.com/torvalds/linux.git
synced 2026-03-13 23:46:14 +01:00
spi: SPISG: Fix less than zero comparison on a u32 variable
The check for ns < 0 is always false because variable ns is a u32 which
is not a signed type. Fix this by making ns a s32 type.
Fixes: cef9991e04 ("spi: Add Amlogic SPISG driver")
Signed-off-by: Colin Ian King <colin.i.king@gmail.com>
Link: https://patch.msgid.link/20250725171701.839927-1-colin.i.king@gmail.com
Signed-off-by: Mark Brown <broonie@kernel.org>
This commit is contained in:
parent
87aa3c8d8c
commit
2d442a0c78
1 changed files with 1 additions and 1 deletions
|
|
@ -163,7 +163,7 @@ struct spisg_device {
|
|||
|
||||
static int spi_delay_to_sclk(u32 slck_speed_hz, struct spi_delay *delay)
|
||||
{
|
||||
u32 ns;
|
||||
s32 ns;
|
||||
|
||||
if (!delay)
|
||||
return 0;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue