Skip to content

Commit

Permalink
spi/rockchip: fix error return code in rockchip_spi_probe()
Browse files Browse the repository at this point in the history
Fix to return -EINVAL from the error handling case instead of 0 when
failed to get fifo length.

Signed-off-by: Wei Yongjun <yongjun_wei@trendmicro.com.cn>
Signed-off-by: Mark Brown <broonie@linaro.org>
  • Loading branch information
Wei Yongjun authored and Mark Brown committed Jul 25, 2014
1 parent 4e6fafe commit db7e8d9
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions drivers/spi/spi-rockchip.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}

Expand Down

0 comments on commit db7e8d9

Please sign in to comment.