Skip to content

Commit

Permalink
spi: qup: Fix return value checking for pm_runtime_get_sync()
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Axel Lin authored and Mark Brown committed May 3, 2014
1 parent c9eaa44 commit 3d89e14
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/spi/spi-qup.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit 3d89e14

Please sign in to comment.