spi: orion: Fix error return code in orion_spi_probe()
authorWei Yongjun <yongjun_wei@trendmicro.com.cn>
Sun, 20 Jul 2014 14:03:14 +0000 (22:03 +0800)
committerMark Brown <broonie@linaro.org>
Fri, 25 Jul 2014 17:28:46 +0000 (18:28 +0100)
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>
drivers/spi/spi-orion.c

index aa3ecfc..3a3170a 100644 (file)
@@ -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);