linux-spi.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH][next] spi: amlogic: Fix error checking on regmap_write call
@ 2025-09-13 20:16 Colin Ian King
  2025-09-16 13:17 ` Mark Brown
  0 siblings, 1 reply; 2+ messages in thread
From: Colin Ian King @ 2025-09-13 20:16 UTC (permalink / raw)
  To: Liang Yang, Feng Chen, Xianwei Zhao, Mark Brown, linux-amlogic,
	linux-spi
  Cc: kernel-janitors, linux-kernel

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@gmail.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


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH][next] spi: amlogic: Fix error checking on regmap_write call
  2025-09-13 20:16 [PATCH][next] spi: amlogic: Fix error checking on regmap_write call Colin Ian King
@ 2025-09-16 13:17 ` Mark Brown
  0 siblings, 0 replies; 2+ messages in thread
From: Mark Brown @ 2025-09-16 13:17 UTC (permalink / raw)
  To: Liang Yang, Feng Chen, Xianwei Zhao, linux-amlogic, linux-spi,
	Colin Ian King
  Cc: kernel-janitors, linux-kernel

On Sat, 13 Sep 2025 21:16:11 +0100, Colin Ian King wrote:
> 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


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2025-09-16 13:17 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-09-13 20:16 [PATCH][next] spi: amlogic: Fix error checking on regmap_write call Colin Ian King
2025-09-16 13:17 ` Mark Brown

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).