]> asedeno.scripts.mit.edu Git - linux.git/commitdiff
spi: qup: Fix return value checking for pm_runtime_get_sync()
authorAxel Lin <axel.lin@ingics.com>
Sat, 3 May 2014 02:57:57 +0000 (10:57 +0800)
committerMark Brown <broonie@linaro.org>
Sat, 3 May 2014 16:52:27 +0000 (09:52 -0700)
pm_runtime_get_sync() returns 1 if !CONFIG_PM_RUNTIME.

Signed-off-by: Axel Lin <axel.lin@ingics.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
drivers/spi/spi-qup.c

index b032e8885e2435b3585810f1266bca9aa3fce6a8..78c66e3c53ed5f88d8d79ac3c16cdb4800af71f0 100644 (file)
@@ -734,7 +734,7 @@ static int spi_qup_remove(struct platform_device *pdev)
        int ret;
 
        ret = pm_runtime_get_sync(&pdev->dev);
-       if (ret)
+       if (ret < 0)
                return ret;
 
        ret = spi_qup_set_state(controller, QUP_STATE_RESET);