From: Wei Yongjun Date: Sun, 20 Jul 2014 14:02:04 +0000 (+0800) Subject: spi/rockchip: fix error return code in rockchip_spi_probe() X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=db7e8d90cae5d0840ad1444b693ec43dbfab339f;p=linux-beck.git spi/rockchip: fix error return code in rockchip_spi_probe() Fix to return -EINVAL from the error handling case instead of 0 when failed to get fifo length. Signed-off-by: Wei Yongjun Signed-off-by: Mark Brown --- diff --git a/drivers/spi/spi-rockchip.c b/drivers/spi/spi-rockchip.c index 47c9168f18b2..c0743604b906 100644 --- a/drivers/spi/spi-rockchip.c +++ b/drivers/spi/spi-rockchip.c @@ -640,6 +640,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; }