]> git.openfabrics.org - ~shefty/rdma-dev.git/commitdiff
spi: omap2-mcspi: fix error return code in omap2_mcspi_probe()
authorWei Yongjun <yongjun_wei@trendmicro.com.cn>
Thu, 18 Apr 2013 03:14:59 +0000 (11:14 +0800)
committerMark Brown <broonie@opensource.wolfsonmicro.com>
Thu, 18 Apr 2013 11:04:55 +0000 (12:04 +0100)
Fix to return a negative error code from the error handling
case instead of 0, as returned elsewhere in this function.

Signed-off-by: Wei Yongjun <yongjun_wei@trendmicro.com.cn>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
drivers/spi/spi-omap2-mcspi.c

index b3db4612b6228a57b1ffe5df9626067e9b5a8eb6..86d2158946bbf3de879cc459e53aa00005e6768f 100644 (file)
@@ -1293,7 +1293,8 @@ static int omap2_mcspi_probe(struct platform_device *pdev)
        pm_runtime_set_autosuspend_delay(&pdev->dev, SPI_AUTOSUSPEND_TIMEOUT);
        pm_runtime_enable(&pdev->dev);
 
-       if (status || omap2_mcspi_master_setup(mcspi) < 0)
+       status = omap2_mcspi_master_setup(mcspi);
+       if (status < 0)
                goto disable_pm;
 
        status = spi_register_master(master);