Skip to contentSkip to conversation

spi/rockchip: fix error return code in rockchip_spi_probe()

PATCH New weiyj_lk at 163.com 2 participants 2 messages Jul 20, 2014 – Jul 25, 2014

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

PATCH 1/1 spi/rockchip: fix error return code in rockchip_spi_probe()

From: Wei Yongjun <[email protected]>

Fix to return -EINVAL from the error handling case instead of 0 when failed to get fifo length.

---
 drivers/spi/spi-rockchip.c | 1 +
 1 file changed, 1 insertion(+)
drivers/spi/spi-rockchip.c +1 -0
index cb8fd6f..8392ff5 100644
@@ -642,6 +642,7 @@ static int rockchip_spi_probe(struct platform_device *pdev)
 	rs->fifo_len = get_fifo_len(rs);
 	if (!rs->fifo_len) {
 		dev_err(&pdev->dev, "Failed to get fifo length\n");
+		ret = -EINVAL;
 		goto err_get_fifo_len;
 	}
 
maintainer
#1 lore raw

PATCH 1/1 spi/rockchip: fix error return code in rockchip_spi_probe()

Quoted 4 lines · On Sun, Jul 20, 2014 at 10:02:04PM +0800, weiyj_lk at 163.com wrote:

From: Wei Yongjun <[email protected]>

Fix to return -EINVAL from the error handling case instead of 0 when failed to get fifo length.

Applied, thanks.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: Digital signature
URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20140725/66ad94d4/attachment.sig>