Skip to content

Commit

Permalink
spi: orion: Fix error return code in orion_spi_probe()
Browse files Browse the repository at this point in the history
Fix to return a negative error code from the error handling case of
orion_spi_reset() instead of 0, as done elsewhere in this function.

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 5c67869 commit 1403381
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion drivers/spi/spi-orion.c
Original file line number Diff line number Diff line change
Expand Up @@ -406,7 +406,8 @@ static int orion_spi_probe(struct platform_device *pdev)
pm_runtime_set_autosuspend_delay(&pdev->dev, SPI_AUTOSUSPEND_TIMEOUT);
pm_runtime_enable(&pdev->dev);

if (orion_spi_reset(spi) < 0)
status = orion_spi_reset(spi);
if (status < 0)
goto out_rel_pm;

pm_runtime_mark_last_busy(&pdev->dev);
Expand Down

0 comments on commit 1403381

Please sign in to comment.