aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
authorColin Ian King <colin.i.king@gmail.com>2025-07-25 18:17:01 +0100
committerMark Brown <broonie@kernel.org>2025-07-25 18:46:31 +0100
commit2d442a0c781403702de27ccfbc4bb233721585f5 (patch)
treea9fdd0fd5e3d456abd5a88bd6532fe08f06df991
parentspi: intel: Allow writeable MTD partition with module param (diff)
downloadwireguard-linux-2d442a0c781403702de27ccfbc4bb233721585f5.tar.xz
wireguard-linux-2d442a0c781403702de27ccfbc4bb233721585f5.zip
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: cef9991e04ae ("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>
-rw-r--r--drivers/spi/spi-amlogic-spisg.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/spi/spi-amlogic-spisg.c b/drivers/spi/spi-amlogic-spisg.c
index 48a5325b4db7..2ab8bdf2a676 100644
--- a/drivers/spi/spi-amlogic-spisg.c
+++ b/drivers/spi/spi-amlogic-spisg.c
@@ -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;