Unverified Commit 18dda9eb authored by Colin Ian King's avatar Colin Ian King Committed by Mark Brown
Browse files

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: 4670db6f ("spi: amlogic: add driver for Amlogic SPI Flash Controller")
Signed-off-by: default avatarColin Ian King <colin.i.king@gmail.com>
Link: https://patch.msgid.link/20250913201612.1338217-1-colin.i.king@gmail.com


Signed-off-by: default avatarMark Brown <broonie@kernel.org>
parent 34c2202f
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -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;