spi: cadence: Return the error code for cdns_spi_suspend and cdns_spi_resume
authorShubhrajyoti Datta <shubhrajyoti.datta@xilinx.com>
Tue, 5 Apr 2016 18:07:54 +0000 (23:37 +0530)
committerMark Brown <broonie@kernel.org>
Tue, 5 Apr 2016 18:51:10 +0000 (11:51 -0700)
Return the error code for cdns_spi_suspend and cdns_spi_resume.
Also fixes a comment where which claims that the error code is
returned.

Signed-off-by: Shubhrajyoti Datta <shubhraj@xilinx.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
drivers/spi/spi-cadence.c

index d0cdd1801e9e59782952c5d47aa407f634ab0c20..07481e12d8a38bc39d7deb8fba3906547b458302 100644 (file)
@@ -615,16 +615,14 @@ static int cdns_spi_remove(struct platform_device *pdev)
  * This function disables the SPI controller and
  * changes the driver state to "suspend"
  *
- * Return:     Always 0
+ * Return:     0 on success and error value on error
  */
 static int __maybe_unused cdns_spi_suspend(struct device *dev)
 {
        struct platform_device *pdev = to_platform_device(dev);
        struct spi_master *master = platform_get_drvdata(pdev);
 
-       spi_master_suspend(master);
-
-       return 0;
+       return spi_master_suspend(master);
 }
 
 /**
@@ -640,9 +638,7 @@ static int __maybe_unused cdns_spi_resume(struct device *dev)
        struct platform_device *pdev = to_platform_device(dev);
        struct spi_master *master = platform_get_drvdata(pdev);
 
-       spi_master_resume(master);
-
-       return 0;
+       return spi_master_resume(master);
 }
 
 /**
This page took 0.025396 seconds and 5 git commands to generate.