diff mbox

spi: qup: Fix return value checking for pm_runtime_get_sync()

Message ID 1399085877.8748.0.camel@phoenix (mailing list archive)
State Accepted
Commit 3d89e141bbf8619f3db97c38e33cb6d7a563614d
Headers show

Commit Message

Axel Lin May 3, 2014, 2:57 a.m. UTC
pm_runtime_get_sync() returns 1 if !CONFIG_PM_RUNTIME.

Signed-off-by: Axel Lin <axel.lin@ingics.com>
---
 drivers/spi/spi-qup.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Mark Brown May 3, 2014, 4:53 p.m. UTC | #1
On Sat, May 03, 2014 at 10:57:57AM +0800, Axel Lin wrote:
> pm_runtime_get_sync() returns 1 if !CONFIG_PM_RUNTIME.

Applied, thanks.
diff mbox

Patch

diff --git a/drivers/spi/spi-qup.c b/drivers/spi/spi-qup.c
index b032e88..78c66e3 100644
--- a/drivers/spi/spi-qup.c
+++ b/drivers/spi/spi-qup.c
@@ -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);