[<prev] [next>] [day] [month] [year] [list]
Message-ID: <20250913201558.1338180-1-colin.i.king@gmail.com>
Date: Sat, 13 Sep 2025 21:15:58 +0100
From: Colin Ian King <colin.i.king@...il.com>
To: Liang Yang <liang.yang@...ogic.com>,
Feng Chen <feng.chen@...ogic.com>,
Xianwei Zhao <xianwei.zhao@...ogic.com>,
Mark Brown <broonie@...nel.org>,
linux-amlogic@...ts.infradead.org,
linux-spi@...r.kernel.org
Cc: kernel-janitors@...r.kernel.org,
linux-kernel@...r.kernel.org
Subject: [PATCH] spi: amlogic: Fix error checking on regmap_write call
Currently a call to regmap_write is not being error checked because the
return checke is being performed on the variable ret and this variable
is not assigned the return value from the regmap_write call. Fix this
by adding in the missing assignment.
Fixes: 4670db6f32e9 ("spi: amlogic: add driver for Amlogic SPI Flash Controller")
Signed-off-by: Colin Ian King <colin.i.king@...il.com>
---
drivers/spi/spi-amlogic-spifc-a4.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/spi/spi-amlogic-spifc-a4.c b/drivers/spi/spi-amlogic-spifc-a4.c
index 4ca8e82fdc67..4338d00e56a6 100644
--- a/drivers/spi/spi-amlogic-spifc-a4.c
+++ b/drivers/spi/spi-amlogic-spifc-a4.c
@@ -420,7 +420,7 @@ static int aml_sfc_dma_buffer_setup(struct aml_sfc *sfc, void *databuf,
goto out_map_data;
cmd = CMD_DATA_ADDRH(sfc->daddr);
- regmap_write(sfc->regmap_base, SFC_CMD, cmd);
+ ret = regmap_write(sfc->regmap_base, SFC_CMD, cmd);
if (ret)
goto out_map_data;
--
2.51.0
Powered by blists - more mailing lists