summaryrefslogtreecommitdiffstats
path: root/drivers/spi/spi-s3c64xx.c
diff options
context:
space:
mode:
authorMark Brown <broonie@linaro.org>2013-09-27 18:44:53 +0100
committerMark Brown <broonie@linaro.org>2013-09-30 12:53:36 +0100
commit8b06d5b8576d1df4122fa9ca40578ec7f094cb3e (patch)
treef4a2d2fc2f0fd98d3086cd6efd7292226dcb1fbb /drivers/spi/spi-s3c64xx.c
parent67651b29ef15e5ef9897ed8cb9072222c4cf3432 (diff)
downloadlinux-8b06d5b8576d1df4122fa9ca40578ec7f094cb3e.tar.gz
linux-8b06d5b8576d1df4122fa9ca40578ec7f094cb3e.tar.bz2
linux-8b06d5b8576d1df4122fa9ca40578ec7f094cb3e.zip
spi/s3c64xx: Check that clock enables succeed on runtime resume
Signed-off-by: Mark Brown <broonie@linaro.org>
Diffstat (limited to 'drivers/spi/spi-s3c64xx.c')
-rw-r--r--drivers/spi/spi-s3c64xx.c12
1 files changed, 10 insertions, 2 deletions
diff --git a/drivers/spi/spi-s3c64xx.c b/drivers/spi/spi-s3c64xx.c
index 2e267ce9dc19..dd5ed13436e5 100644
--- a/drivers/spi/spi-s3c64xx.c
+++ b/drivers/spi/spi-s3c64xx.c
@@ -1524,9 +1524,17 @@ static int s3c64xx_spi_runtime_resume(struct device *dev)
{
struct spi_master *master = dev_get_drvdata(dev);
struct s3c64xx_spi_driver_data *sdd = spi_master_get_devdata(master);
+ int ret;
- clk_prepare_enable(sdd->src_clk);
- clk_prepare_enable(sdd->clk);
+ ret = clk_prepare_enable(sdd->src_clk);
+ if (ret != 0)
+ return ret;
+
+ ret = clk_prepare_enable(sdd->clk);
+ if (ret != 0) {
+ clk_disable_unprepare(sdd->src_clk);
+ return ret;
+ }
return 0;
}