Skip to contentSkip to conversation

spi: amlogic: Fix error checking on regmap_write call

PATCH In review Colin Ian King 2 participants 2 messages Sep 13, 2025 – Sep 16, 2025

Subsystems (4)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 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")
---
 drivers/spi/spi-amlogic-spifc-a4.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/spi/spi-amlogic-spifc-a4.c +1 -1
index 4ca8e82fdc67..4338d00e56a6 100644
@@ -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;
 
Signature · 1 line
2.51.0
maintainer
#1 lore raw
Quoted 6 lines · Colin Ian King

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.

Applied to

https://git.kernel.org/pub/scm/linux/kernel/git/broonie/spi.git for-next

Thanks!

[1/1] spi: amlogic: Fix error checking on regmap_write call

      commit: 18dda9eb9e11b2aeec73cbe2a56ab2f862841ba4

All being well this means that it will be integrated into the linux-next tree (usually sometime in the next 24 hours) and sent to Linus during the next merge window (or sooner if it is a bug fix), however if problems are discovered then the patch may be dropped or reverted.

You may get further e-mails resulting from automated or manual testing and review of the tree, please engage with people reporting problems and send followup patches addressing any issues that are reported if needed.

If any updates are required or you are submitting further changes they should be sent as incremental updates against current git, existing patches will not be replaced.

Please add any relevant lists and maintainers to the CCs when replying to this mail.

Thanks,
Mark