kernel-janitors.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH][next] spi: rockchip-sfc: Fix assigned but never used return error codes
@ 2021-08-18 14:10 Colin King
  2021-08-23 17:37 ` Mark Brown
  0 siblings, 1 reply; 2+ messages in thread
From: Colin King @ 2021-08-18 14:10 UTC (permalink / raw)
  To: Mark Brown, Heiko Stuebner, Chris Morgan, Jon Lin, linux-spi,
	linux-arm-kernel, linux-rockchip
  Cc: kernel-janitors, linux-kernel

From: Colin Ian King <colin.king@canonical.com>

Currently there are two places where the error return variable ret is
being assigned -ETIMEDOUT on timeout errors and this value is not
being returned. Fix this by returning -ETIMEDOUT rather than redundantly
assiging it to ret.

Addresses-Coverity: ("Unused value")
Fixes: 0b89fc0a367e ("spi: rockchip-sfc: add rockchip serial flash controller")
Signed-off-by: Colin Ian King <colin.king@canonical.com>
---
 drivers/spi/spi-rockchip-sfc.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/spi/spi-rockchip-sfc.c b/drivers/spi/spi-rockchip-sfc.c
index 7c4d47fe80c2..827e205c5340 100644
--- a/drivers/spi/spi-rockchip-sfc.c
+++ b/drivers/spi/spi-rockchip-sfc.c
@@ -257,7 +257,7 @@ static int rockchip_sfc_wait_txfifo_ready(struct rockchip_sfc *sfc, u32 timeout_
 	if (ret) {
 		dev_dbg(sfc->dev, "sfc wait tx fifo timeout\n");
 
-		ret = -ETIMEDOUT;
+		return -ETIMEDOUT;
 	}
 
 	return (status & SFC_FSR_TXLV_MASK) >> SFC_FSR_TXLV_SHIFT;
@@ -274,7 +274,7 @@ static int rockchip_sfc_wait_rxfifo_ready(struct rockchip_sfc *sfc, u32 timeout_
 	if (ret) {
 		dev_dbg(sfc->dev, "sfc wait rx fifo timeout\n");
 
-		ret = -ETIMEDOUT;
+		return -ETIMEDOUT;
 	}
 
 	return (status & SFC_FSR_RXLV_MASK) >> SFC_FSR_RXLV_SHIFT;
-- 
2.32.0


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

* Re: [PATCH][next] spi: rockchip-sfc: Fix assigned but never used return error codes
  2021-08-18 14:10 [PATCH][next] spi: rockchip-sfc: Fix assigned but never used return error codes Colin King
@ 2021-08-23 17:37 ` Mark Brown
  0 siblings, 0 replies; 2+ messages in thread
From: Mark Brown @ 2021-08-23 17:37 UTC (permalink / raw)
  To: linux-arm-kernel, Jon Lin, Chris Morgan, linux-rockchip,
	linux-spi, Heiko Stuebner, Colin King
  Cc: Mark Brown, kernel-janitors, linux-kernel

On Wed, 18 Aug 2021 15:10:51 +0100, Colin King wrote:
> From: Colin Ian King <colin.king@canonical.com>
> 
> Currently there are two places where the error return variable ret is
> being assigned -ETIMEDOUT on timeout errors and this value is not
> being returned. Fix this by returning -ETIMEDOUT rather than redundantly
> assiging it to ret.
> 
> [...]

Applied to

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

Thanks!

[1/1] spi: rockchip-sfc: Fix assigned but never used return error codes
      commit: 745649c59a0d1fde9dcc02286f23f8c78a1f724d

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:[~2021-08-23 17:38 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-08-18 14:10 [PATCH][next] spi: rockchip-sfc: Fix assigned but never used return error codes Colin King
2021-08-23 17:37 ` 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).