Message ID | 1370881346-28000-1-git-send-email-s.nawrocki@samsung.com (mailing list archive) |
---|---|
State | Not Applicable, archived |
Headers | show |
On Mon, Jun 10, 2013 at 06:22:26PM +0200, Sylwester Nawrocki wrote: > If the device is already in a runtime PM enabled state > pm_runtime_get_sync() will return 1, so a test for negative > value should be used to check for errors. Applied, thanks.
diff --git a/drivers/spi/spi-s3c64xx.c b/drivers/spi/spi-s3c64xx.c index 5000586..71cc3e6 100644 --- a/drivers/spi/spi-s3c64xx.c +++ b/drivers/spi/spi-s3c64xx.c @@ -444,7 +444,7 @@ static int s3c64xx_spi_prepare_transfer(struct spi_master *spi) } ret = pm_runtime_get_sync(&sdd->pdev->dev); - if (ret != 0) { + if (ret < 0) { dev_err(dev, "Failed to enable device: %d\n", ret); goto out_tx; }