Commit 745649c5 authored by Colin Ian King's avatar Colin Ian King Committed by Mark Brown

spi: rockchip-sfc: Fix assigned but never used return error codes

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: 0b89fc0a ("spi: rockchip-sfc: add rockchip serial flash controller")
Signed-off-by: default avatarColin Ian King <colin.king@canonical.com>
Link: https://lore.kernel.org/r/20210818141051.36320-1-colin.king@canonical.comSigned-off-by: default avatarMark Brown <broonie@kernel.org>
parent 8d00f981
......@@ -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;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment