projects
/
GitHub
/
LineageOS
/
android_kernel_motorola_exynos9610.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
67651b2
)
spi/s3c64xx: Check that clock enables succeed on runtime resume
author
Mark Brown
<broonie@linaro.org>
Fri, 27 Sep 2013 17:44:53 +0000
(18:44 +0100)
committer
Mark Brown
<broonie@linaro.org>
Mon, 30 Sep 2013 11:53:36 +0000
(12:53 +0100)
Signed-off-by: Mark Brown <broonie@linaro.org>
drivers/spi/spi-s3c64xx.c
patch
|
blob
|
blame
|
history
diff --git
a/drivers/spi/spi-s3c64xx.c
b/drivers/spi/spi-s3c64xx.c
index 2e267ce9dc19a2b99e97c9165b6be470ff8847c3..dd5ed13436e5068fe5f1990f72a05eca0f18fabb 100644
(file)
--- 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;
}